From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC85EC43219 for ; Tue, 5 Apr 2022 11:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243186AbiDELJu (ORCPT ); Tue, 5 Apr 2022 07:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355795AbiDEKWF (ORCPT ); Tue, 5 Apr 2022 06:22:05 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5511A0BFF; Tue, 5 Apr 2022 03:05:08 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 257371EC02B9; Tue, 5 Apr 2022 12:05:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1649153103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=4VtHZy5uYVYyzEGO3ijQUjRjE/WT3pEW+hUot8IpWSo=; b=pmXxhTvsasP3dTAqvVGXVrLgoQDlT7C3KuTutUtzXiYyERya82ZIG4as/JmGzjWc4jjxRh 5QbBDCrxlhvz5n9dej0rM3ZM+rPRb66oFo5VUIU0p7R2mi6TIghCIbvB5D22cerirYTp8R bBpb28CkqK0ncd8c2jmY6C80SEGkPCw= Date: Tue, 5 Apr 2022 12:04:59 +0200 From: Borislav Petkov To: Richard Biener Cc: linux-toolchains@vger.kernel.org, Michael Matz , lkml Subject: Re: older gccs and case labels producing integer constants Message-ID: References: <7o5nn52-nqn1-oo13-s6o9-59r85r91o768@fhfr.qr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7o5nn52-nqn1-oo13-s6o9-59r85r91o768@fhfr.qr> Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Tue, Apr 05, 2022 at 11:58:33AM +0200, Richard Biener wrote: > also with 'unsigned int i' but that's accepted with GCC 7. So > what do you switch on? Ah, right, so it must be some of the gazillion switches. Below's a dump from building the asm version of that same file. Can you recognize which one might be causing this? # GNU C11 (SUSE Linux) version 7.5.0 (x86_64-suse-linux) # compiled by GNU C version 7.5.0, GMP version 6.1.2, MPFR version 4.0.2-p6, MPC version 1.1.0, isl version isl-0.18-GMP # GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 # options passed: -nostdinc -I ./arch/x86/include # -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi # -I ./arch/x86/include/generated/uapi -I ./include/uapi # -I ./include/generated/uapi -D __KERNEL__ -D CC_USING_FENTRY -D MODULE # -D KBUILD_BASENAME="midi" -D KBUILD_MODNAME="snd_usbmidi_lib" # -D __KBUILD_MODNAME=kmod_snd_usbmidi_lib # -include ./include/linux/compiler-version.h # -include ./include/linux/kconfig.h # -include ./include/linux/compiler_types.h -MMD sound/usb/.midi.s.d # sound/usb/midi.c -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 # -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 # -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel # -mindirect-branch=thunk-extern -mindirect-branch-register -mrecord-mcount # -mfentry -march=x86-64 -auxbase-strip sound/usb/midi.s -O2 -Wall -Wundef # -Werror=strict-prototypes -Wno-trigraphs # -Werror=implicit-function-declaration -Werror=implicit-int # -Werror=return-type -Wno-format-security -Wno-sign-compare # -Wno-frame-address -Wformat-truncation=0 -Wformat-overflow=0 # -Wframe-larger-than=2048 -Werror -Wimplicit-fallthrough=5 -Wno-main # -Wno-unused-but-set-variable -Wunused-const-variable=0 # -Wdeclaration-after-statement -Wvla -Wno-pointer-sign # -Wstringop-overflow=0 -Wno-restrict -Wno-maybe-uninitialized # -Werror=date-time -Werror=incompatible-pointer-types # -Werror=designated-init -std=gnu11 -p -fno-strict-aliasing -fno-common # -fshort-wchar -fno-PIE -falign-jumps=1 -falign-loops=1 # -fno-asynchronous-unwind-tables -fno-jump-tables # -fno-delete-null-pointer-checks -fno-reorder-blocks -fno-ipa-cp-clone # -fno-partial-inlining -fstack-protector-strong # -fno-stack-clash-protection -fno-inline-functions-called-once # -falign-functions=64 -fno-strict-overflow -fstack-check=no # -fconserve-stack -fsanitize=bounds -fsanitize=shift # -fsanitize=integer-divide-by-zero -fsanitize=bool -fsanitize=enum # -fsanitize-coverage=trace-pc -fverbose-asm # --param allow-store-data-races=0 # options enabled: -falign-labels -fauto-inc-dec -fbranch-count-reg # -fcaller-saves -fchkp-check-incomplete-type -fchkp-check-read # -fchkp-check-write -fchkp-instrument-calls -fchkp-narrow-bounds # -fchkp-optimize -fchkp-store-bounds -fchkp-use-static-bounds # -fchkp-use-static-const-bounds -fchkp-use-wrappers -fcode-hoisting # -fcombine-stack-adjustments -fcompare-elim -fcprop-registers # -fcrossjumping -fcse-follow-jumps -fdefer-pop -fdevirtualize # -fdevirtualize-speculatively -fdwarf2-cfi-asm -fearly-inlining # -feliminate-unused-debug-types -fexpensive-optimizations # -fforward-propagate -ffp-int-builtin-inexact -ffunction-cse -fgcse # -fgcse-lm -fgnu-runtime -fgnu-unique -fguess-branch-probability # -fhoist-adjacent-loads -fident -fif-conversion -fif-conversion2 # -findirect-inlining -finline -finline-atomics -finline-small-functions # -fipa-bit-cp -fipa-cp -fipa-icf -fipa-icf-functions -fipa-icf-variables # -fipa-profile -fipa-pure-const -fipa-reference # -fipa-reference-addressable -fipa-sra -fipa-stack-alignment -fipa-vrp # -fira-hoist-pressure -fira-share-save-slots -fira-share-spill-slots # -fisolate-erroneous-paths-dereference -fivopts -fkeep-static-consts # -fleading-underscore -flifetime-dse -flra-remat -flto-odr-type-merging # -fmath-errno -fmerge-constants -fmerge-debug-strings # -fmove-loop-invariants -fomit-frame-pointer -foptimize-sibling-calls # -foptimize-strlen -fpeephole -fpeephole2 -fplt -fprefetch-loop-arrays # -fprofile -free -freg-struct-return -freorder-functions # -frerun-cse-after-loop -fsanitize-coverage=trace-pc # -fsched-critical-path-heuristic -fsched-dep-count-heuristic # -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic # -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic # -fsched-stalled-insns-dep -fschedule-fusion -fschedule-insns2 # -fsemantic-interposition -fshow-column -fshrink-wrap # -fshrink-wrap-separate -fsigned-zeros -fsplit-ivs-in-unroller # -fsplit-wide-types -fssa-backprop -fssa-phiopt -fstack-protector-strong # -fstdarg-opt -fstore-merging -fstrict-volatile-bitfields -fsync-libcalls # -fthread-jumps -ftoplevel-reorder -ftrapping-math -ftree-bit-ccp # -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-coalesce-vars # -ftree-copy-prop -ftree-cselim -ftree-dce -ftree-dominator-opts # -ftree-dse -ftree-forwprop -ftree-fre -ftree-loop-if-convert # -ftree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize # -ftree-parallelize-loops= -ftree-phiprop -ftree-pre -ftree-pta # -ftree-reassoc -ftree-scev-cprop -ftree-sink -ftree-slsr -ftree-sra # -ftree-switch-conversion -ftree-tail-merge -ftree-ter -ftree-vrp # -funit-at-a-time -fverbose-asm -fzero-initialized-in-bss # -m128bit-long-double -m64 -malign-stringops -mavx256-split-unaligned-load # -mavx256-split-unaligned-store -mfentry -mfxsr -mglibc -mieee-fp # -mindirect-branch-register -mlong-double-80 -mno-fancy-math-387 # -mno-red-zone -mno-sse4 -mpush-args -mrecord-mcount -mskip-rax-setup # -mtls-direct-seg-refs -mvzeroupper -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette