[LLVMbugs] [Bug 2901] New: C-Backend crashes on compilng with O, O2, O3: " Expected FP register!"

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Oct 16 12:46:09 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2901

           Summary: C-Backend crashes on compilng with O, O2, O3: "Expected
                    FP register!"
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: khabkr at yahoo.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2092)
 --> (http://llvm.org/bugs/attachment.cgi?id=2092)
Preprocessed C source code archive

SUMMARY
llvm-gcc chokes on six module files in Python's 2.6 source tree, namely:

1. ../Modules/cmathmodule.c 
2. ../Modules/mathmodule.c
3. ../Objects/complexobject.c 
4  ../Objects/floatobject.c
5. ../Objects/longobject.c
6. ../Python/pymath.c


(and do note the math connection), as follows:

Assertion failed: Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!", file c:/proj/llvm/src/lib/Target/X86/X86FloatingPoint.cpp, line 174

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../Objects/floatobject.c: At top level:
../Objects/floatobject.c:2521: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

The same error is repeated for all six files. Details follow together with an
attached zip file containing the preprocessed C source code.



PLATFORM
OS: Windows Vista 32 SP1 on Intel (Centrino) Core 2 Due


With the following command issued in MSYS:
alias gcc=/c/dev/llvm-gcc4.2-2.2/bin/llvm-gcc

we get:

gcc -v
Using built-in specs.
Target: i386-mingw32
Configured with: ../src/configure --build=i386-mingw32 --host=i386-mingw32
--target=i386-mingw32 --disable-shared --disable-bootstrap --disable-nls
--with-arch=i486 --with-cpu=generic --prefix=c:/proj/llvm/llvm-gcc-4.2/install
--enable-llvm=c:/proj/llvm/build --disable-win32-registry
--enable-languages=c,c++ --program-prefix=llvm- --with-sjlj-exceptions=no
Thread model: win32
gcc version 4.2.1 (Based on Apple Inc. build 5546) (LLVM build)


LLVM FILES
The llvm files (LLVM-GCC 4.2 Front End Binaries for Mingw32/x86 (22M)) were
downloaded from here:
http://llvm.org/releases/2.2/llvm-gcc4.2-2.2-x86-mingw32.tar.bz2



COMMENTS
All six files compile fine if the optimization options (-O, -O2, -O3) are
removed. 



PROBLEM FILES LIST AND COMPILER OUTPUT
[1] --------------------------------------
$ gcc -I"../Include" -I"../Pc" -I"../Python" -I"../Modules/zlib" -Wall -DNDEBUG
-DPy_BUILD_CORE -DPy_ENABLE_SHARED -O3 -fomit-fram
e-pointer -fwrapv -c -o../Modules/cmathmodule.o ../Modules/cmathmodule.c 
-save-temps
Assertion failed: Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!", file c:/proj/llvm/src/lib/Target/X86/X86FloatingPoint.cpp, line 174

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../Modules/cmathmodule.c:1209: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


[2] --------------------------------------
$ gcc -I"../Include" -I"../Pc" -I"../Python" -I"../Modules/zlib" -Wall -DNDEBUG
-DPy_BUILD_CORE -DPy_ENABLE_SHARED -O3 -fomit-fram
e-pointer -fwrapv -c -o ../Modules/mathmodule.o ../Modules/mathmodule.c
-save-temps
Assertion failed: Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!", file c:/proj/llvm/src/lib/Target/X86/X86FloatingPoint.cpp, line 174

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../Modules/mathmodule.c:1063: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


[3] --------------------------------------
$ gcc -I"../Include" -I"../Pc" -I"../Python" -I"../Modules/zlib" -Wall -DNDEBUG
-DPy_BUILD_CORE -DPy_ENABLE_SHARED -O3 -fomit-fram
e-pointer -fwrapv -c -o ../Objects/complexobject.o ../Objects/complexobject.c
-save-temps
../Objects/complexobject.c: In function 'complex_richcompare':
../Objects/complexobject.c:776: warning: dereferencing type-punned pointer will
break strict-aliasing rules
../Objects/complexobject.c:778: warning: dereferencing type-punned pointer will
break strict-aliasing rules
../Objects/complexobject.c: In function 'complex_new':
../Objects/complexobject.c:1051: warning: dereferencing type-punned pointer
will break strict-aliasing rules
Assertion failed: Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!", file c:/proj/llvm/src/lib/Target/X86/X86FloatingPoint.cpp, line 174

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../Objects/complexobject.c: At top level:
../Objects/complexobject.c:1271: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


[4] --------------------------------------
$ gcc -I"../Include" -I"../Pc" -I"../Python" -I"../Modules/zlib" -Wall -DNDEBUG
-DPy_BUILD_CORE -DPy_ENABLE_SHARED -O3 -fomit-fram
e-pointer -fwrapv -c -o ../Objects/floatobject.o ../Objects/floatobject.c
-save-temps
../Objects/floatobject.c: In function 'float_is_integer':
../Objects/floatobject.c:1038: warning: dereferencing type-punned pointer will
break strict-aliasing rules
../Objects/floatobject.c:1038: warning: dereferencing type-punned pointer will
break strict-aliasing rules
../Objects/floatobject.c:1041: warning: dereferencing type-punned pointer will
break strict-aliasing rules
../Objects/floatobject.c:1041: warning: dereferencing type-punned pointer will
break strict-aliasing rules
../Objects/floatobject.c: In function 'float_new':
../Objects/floatobject.c:1626: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Assertion failed: Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!", file c:/proj/llvm/src/lib/Target/X86/X86FloatingPoint.cpp, line 174

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../Objects/floatobject.c: At top level:
../Objects/floatobject.c:2521: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


[5] --------------------------------------
$ gcc -I"../Include" -I"../Pc" -I"../Python" -I"../Modules/zlib" -Wall -DNDEBUG
-DPy_BUILD_CORE -DPy_ENABLE_SHARED -O3 -fomit-fram
e-pointer -fwrapv -c -o ../Objects/longobject.o ../Objects/longobject.c
-save-temps
../Objects/longobject.c: In function '_PyLong_Format':
../Objects/longobject.c:1360: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Assertion failed: Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!", file c:/proj/llvm/src/lib/Target/X86/X86FloatingPoint.cpp, line 174

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../Objects/longobject.c: At top level:
../Objects/longobject.c:3591: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


[6] --------------------------------------
$ gcc -I"../Include" -I"../Pc" -I"../Python" -I"../Modules/zlib" -Wall -DNDEBUG
-DPy_BUILD_CORE -DPy_ENABLE_SHARED -O3 -fomit-fram
e-pointer -fwrapv -c -o ../Python/pymath.o ../Python/pymath.c -save-temps
Assertion failed: Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!", file c:/proj/llvm/src/lib/Target/X86/X86FloatingPoint.cpp, line 174

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../Python/pymath.c:237: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


Regards
Khalid


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list