Bug 495613

Summary: ICE compiling some kernel code works on gcc 4.3
Product: [Fedora] Fedora Reporter: Dave Airlie <airlied>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: rawhideCC: jakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-14 09:38:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
preprocessed source code none

Description Dave Airlie 2009-04-14 03:16:59 UTC
Created attachment 339412 [details]
preprocessed source code

I was porting some fixed point code from equiv floating point code in userspace into the kernel and when I got to compiling it, I got an ICE.

gcc -Wp,-MD,drivers/gpu/drm/radeon/.radeon_legacy_crtc.o.d  -nostdinc -isystem /usr/lib/gcc/i586-redhat-linux/4.4.0/include -Iinclude -Iinclude2 -I/home/airlied/kernel/rawhide-2.6/include -I/home/airlied/kernel/rawhide-2.6/arch/x86/include -include include/linux/autoconf.h  -I/home/airlied/kernel/rawhide-2.6/drivers/gpu/drm/radeon -Idrivers/gpu/drm/radeon -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=pentium3 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow  -I/home/airlied/kernel/rawhide-2.6/arch/x86/include/asm/mach-default -Iarch/x86/include/asm/mach-default -Wframe-larger-than=1024 -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign  -I/home/airlied/kernel/rawhide-2.6/include/drm -Iinclude/drm -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(radeon_legacy_crtc)"  -D"KBUILD_MODNAME=KBUILD_STR(radeon)"  -c -o drivers/gpu/drm/radeon/radeon_legacy_crtc.o /home/airlied/kernel/rawhide-2.6/drivers/gpu/drm/radeon/radeon_legacy_crtc.c

was the kernel build line.

attached is the ice.out

gcc -v
Using built-in specs.
Target: i586-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i586 --build=i586-redhat-linux
Thread model: posix
gcc version 4.4.0 20090409 (Red Hat 4.4.0-0.32) (GCC)

Comment 1 Jakub Jelinek 2009-04-14 09:38:18 UTC
Tracking upstream.

BTW, when using -msoft-float, I guess it is better not to use floating point in your code, I doubt the kernel has all the soft-float helper routines anyway.