Bug 48356 - Compiler error on compilation of linux source file p80211wep.c if -O2 is used
Summary: Compiler error on compilation of linux source file p80211wep.c if -O2 is used
Status: RESOLVED DUPLICATE of bug 48343
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.6.0
: P3 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL: http://microbiology-bonn.de/~ernst/p8...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-30 08:18 UTC by Ernst Molitor
Modified: 2011-03-30 09:27 UTC (History)
0 users

See Also:
Host: Linux felicia 2.6.38-custom #1 SMP Tue Mar 15 22:16:35 CET 2011 i686 GNU/Linux
Target: i386
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ernst Molitor 2011-03-30 08:18:31 UTC
Trying to compile the current Linux kernel (Linux 2.6.39-rc1, latest commit: 0ce790e7d736cedc563e1fb4e998babf5a4dbc3d), I ran across a compiler error.

The source file linux-2.6/drivers/staging/wlan-ng/p80211wep.c causes this error message:

gcc -Wp,-MD,drivers/staging/wlan-ng/.p80211wep.o.d  -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/include -I/linux-2.6/arch/x86/include -Iinclude  -include include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=core2 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -save-temps  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(p80211wep)"  -D"KBUILD_MODNAME=KBUILD_STR(prism2_usb)" -c -o drivers/staging/wlan-ng/.tmp_p80211wep.o drivers/staging/wlan-ng/p80211wep.c
gcc: warning: -pipe ignored because -save-temps specified
drivers/staging/wlan-ng/p80211wep.c: In function 'wep_decrypt':
drivers/staging/wlan-ng/p80211wep.c:229:1: internal compiler error: in form_sum, at reload.c:5338
Please submit a full bug report,
with preprocessed source if appropriate.

The included file p80211wep.i causes this error if compiled with 

gcc  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=core2 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -save-temps  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(p80211wep)"  -D"KBUILD_MODNAME=KBUILD_STR(prism2_usb)" -c  p80211wep.i 

With -O instead of -O2, the file compiles nicely.

Best regards,

Ernst

P.S.: Warmest thanks for the most impressive gcc tool chain.
Comment 1 Richard Biener 2011-03-30 09:27:54 UTC
dup.

*** This bug has been marked as a duplicate of bug 48343 ***