http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54151
Bug #: 54151 Summary: Comparing if float is equal to decimal constant on Microblaze with mhard-float results in internal compiler error. Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: cyberwizzard+...@gmail.com Created attachment 27920 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27920 Test case triggering the internal compiler error When determining if a floating point variable is equal to a decimal constant (without float typing) the Microblaze GCC with 'mhard-float' throws an internal error: test.cc:1:5: internal compiler error: in prepare_float_lib_cmp, at optabs.c:4272 Host sytem used to build GCC 4.7.1 for Microblaze: Ubuntu 12.04 64-bit. The example compiles fine on x86_64 and on Microblaze without 'mhard-float'. Example triggering the internal error: int main(){ float a; if(a==1.0) { return 1; } return 0; } Output of g++ for Microblaze: mb-g++ -v -save-temps -mhard-float 'test.cc' Using built-in specs. COLLECT_GCC=/home/cyberwizzard/Documents/gcc/install/bin/mb-g++ COLLECT_LTO_WRAPPER=/home/cyberwizzard/Documents/gcc/install/libexec/gcc/microblaze-xilinx-elf/4.7.1/lto-wrapper Target: microblaze-xilinx-elf Configured with: ../configure --target=microblaze-xilinx-elf --program-prefix=mb- --prefix=/home/cyberwizzard/Documents/gcc/install --enable-languages=c --disable-nls --without-headers --disable-libssp --with-newlib : (reconfigured) ../configure --target=microblaze-xilinx-elf --program-prefix=mb- --prefix=/home/cyberwizzard/Documents/gcc/install --enable-languages=c,c++ --disable-nls --without-headers --disable-libssp --with-newlib Thread model: single gcc version 4.7.1 (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mhard-float' /home/cyberwizzard/Documents/gcc/install/libexec/gcc/microblaze-xilinx-elf/4.7.1/cc1plus -E -quiet -v test.cc -mhard-float -fpch-preprocess -o test.ii ignoring nonexistent directory "/home/cyberwizzard/Documents/gcc/install/lib/gcc/microblaze-xilinx-elf/4.7.1/../../../../microblaze-xilinx-elf/sys-include" #include "..." search starts here: #include <...> search starts here: /home/cyberwizzard/Documents/gcc/install/lib/gcc/microblaze-xilinx-elf/4.7.1/../../../../microblaze-xilinx-elf/include/c++/4.7.1 /home/cyberwizzard/Documents/gcc/install/lib/gcc/microblaze-xilinx-elf/4.7.1/../../../../microblaze-xilinx-elf/include/c++/4.7.1/microblaze-xilinx-elf /home/cyberwizzard/Documents/gcc/install/lib/gcc/microblaze-xilinx-elf/4.7.1/../../../../microblaze-xilinx-elf/include/c++/4.7.1/backward /home/cyberwizzard/Documents/gcc/install/lib/gcc/microblaze-xilinx-elf/4.7.1/include /home/cyberwizzard/Documents/gcc/install/lib/gcc/microblaze-xilinx-elf/4.7.1/include-fixed /home/cyberwizzard/Documents/gcc/install/lib/gcc/microblaze-xilinx-elf/4.7.1/../../../../microblaze-xilinx-elf/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mhard-float' /home/cyberwizzard/Documents/gcc/install/libexec/gcc/microblaze-xilinx-elf/4.7.1/cc1plus -fpreprocessed test.ii -quiet -dumpbase test.cc -mhard-float -auxbase test -version -o test.s GNU C++ (GCC) version 4.7.1 (microblaze-xilinx-elf) compiled by GNU C version 4.6.3, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++ (GCC) version 4.7.1 (microblaze-xilinx-elf) compiled by GNU C version 4.6.3, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 4290bd7345f2e2cf3d0e24567cded0ba test.cc: In function 'int main()': test.cc:1:5: internal compiler error: in prepare_float_lib_cmp, at optabs.c:4272 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.