http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58967
Bug ID: 58967 Summary: Powerpc -mlra cannot compile quadrature_lib.cc in Spec2006 with -O3 -ffast-math -funroll-loops -m32 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: meissner at gcc dot gnu.org Created attachment 31138 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31138&action=edit -save-temps=obj output of the preprocessor of the bug that shows the problem Subversion id 204267 of the trunk of GCC cannot build the module quadrature_lib.cc in the Spec 2006 dealII benchmark if you use the -O3 -ffast-math -funroll-loops -m32 -mlra options. If you eliminated the -mlra option, it compiles fine. If you eliminate the -funroll-loops option, but keep the -mlra option, it works fine. Here is the traceback: -bns-> /opt/at7.0/bin/gdb cc1plus GNU gdb (GDB) 7.6.50.20130722-cvs Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "powerpc64-linux". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". .. Reading symbols from /home/meissner/fsf-build-ppc64/trunk-204267/gcc/cc1plus...done. Breakpoint 1 at 0x10eb5840: file /home/meissner/fsf-src/trunk-204267/gcc/diagnostic.c, line 1182. Breakpoint 2 at 0x10eb7190: file /home/meissner/fsf-src/trunk-204267/gcc/diagnostic.c, line 1123. Breakpoint 3 at 0x10f29548 Breakpoint 4 at 0x10f295a0 File tree.h will be skipped when stepping. Successfully loaded GDB hooks for GCC (gdb) r -O3 -funroll-loops -mcpu=power7 -ffast-math -quiet -mlra -m32 quadrature_lib.ii Starting program: /home/meissner/fsf-build-ppc64/trunk-204267/gcc/cc1plus -O3 -funroll-loops -mcpu=power7 -ffast-math -quiet -mlra -m32 quadrature_lib.ii Breakpoint 1, fancy_abort (file=0x10f9edf0 "/home/meissner/fsf-src/trunk-204267/gcc/lra.c", line=2034, function=0x10f9eba8 <check_rtl(bool)::__FUNCTION__> "check_rtl") at /home/meissner/fsf-src/trunk-204267/gcc/diagnostic.c:1182 1182 { (gdb) up #1 0x0000000010731660 in check_rtl (final_p=final_p@entry=true) at /home/meissner/fsf-src/trunk-204267/gcc/lra.c:2034 2034 lra_assert (constrain_operands (1)); (gdb) print insn $1 = (rtx) 0xfffa970f540 (gdb) pr warning: Expression is not an assignment (and might have no effect) (insn 405 602 390 22 (set (reg:TF 35 3) (mem/u/c:TF (lo_sum:SI (reg:SI 9 9 [443]) (symbol_ref/u:SI ("*.LC10") [flags 0x82])) [64 S16 A128])) quadrature_lib.cc:80 452 {*movtf_internal} (nil)) (gdb)