https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94451
Bug ID: 94451 Summary: April 1st 2020 GCC does not compile spec 2017 gcc_r benchmark with -O3 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: meissner at gcc dot gnu.org Target Milestone: --- Created attachment 48166 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48166&action=edit decimal64.i file that shows the bug. I was building Spec 2017 with the current master compiler branch, and it failed in 3 benchmarks. I looked at the failure of the gcc_r benchmark, and I discovered that the decimal64.c function gets a compiler error when I build a compiler with default checks enabled. I narrowed it down so that it fails with -O2 -fsplit-loops -ftree-vectorize and -fgnu89-inline (the -fgnu89-inline is not needed for the failure, but it is generally needed to compile Spec 2017). -perch-> /opt/at13.0/bin/gdb cc1 GNU gdb (GDB) 8.3.1.20191211-git Copyright (C) 2019 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 "powerpc64le-linux-gnu". 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 cc1... Breakpoint 1 at 0x101dba40: file /home/meissner/fsf-src/trunk/gcc/diagnostic.c, line 1777. Breakpoint 2 at 0x1193e368: file /home/meissner/fsf-src/trunk/gcc/diagnostic.c, line 1706. Breakpoint 3 at 0x11a15fe8 Breakpoint 4 at 0x11a15fc4 File tree.h will be skipped when stepping. File is-a.h will be skipped when stepping. File line-map.h will be skipped when stepping. File timevar.h will be skipped when stepping. Function rtx_expr_list::next will be skipped when stepping. Function rtx_expr_list::element will be skipped when stepping. Function rtx_insn_list::next will be skipped when stepping. Function rtx_insn_list::insn will be skipped when stepping. Function rtx_sequence::len will be skipped when stepping. Function rtx_sequence::element will be skipped when stepping. Function rtx_sequence::insn will be skipped when stepping. Function INSN_UID will be skipped when stepping. Function PREV_INSN will be skipped when stepping. Function SET_PREV_INSN will be skipped when stepping. Function NEXT_INSN will be skipped when stepping. Function SET_NEXT_INSN will be skipped when stepping. Function BLOCK_FOR_INSN will be skipped when stepping. Function PATTERN will be skipped when stepping. Function INSN_LOCATION will be skipped when stepping. Function INSN_HAS_LOCATION will be skipped when stepping. Function JUMP_LABEL_AS_INSN will be skipped when stepping. Successfully loaded GDB hooks for GCC (gdb) r -O2 -fsplit-loops -ftree-vectorize -fgnu89-inline -quiet foo-decimal64.i Starting program: /home/meissner/fsf-build-ppc64le/trunk/gcc/cc1 -O2 -fsplit-loops -ftree-vectorize -fgnu89-inline -quiet foo-decimal64.i decimal64.c: In function ‘decDigitsToDPD’: decimal64.c:662:6: error: missing definition for SSA_NAME: _292 in statement: target_205 = _292; Breakpoint 2, internal_error (gmsgid=0x11acd0d0 "verify_ssa failed") at /home/meissner/fsf-src/trunk/gcc/diagnostic.c:1787 1787 global_dc->diagnostic_group_nesting_depth++; (gdb) where #0 internal_error (gmsgid=0x11acd0d0 "verify_ssa failed") at /home/meissner/fsf-src/trunk/gcc/diagnostic.c:1787 #1 0x0000000010e2efac in verify_ssa (check_modified_stmt=<optimized out>, check_ssa_operands=<optimized out>) at /home/meissner/fsf-src/trunk/gcc/tree-ssa.c:1208 #2 0x00000000109b6ea0 in execute_function_todo (fn=0x7ffff5a41550, data=<optimized out>) at /home/meissner/fsf-src/trunk/gcc/passes.c:1992 #3 0x00000000109b80d4 in do_per_function (callback=<optimized out>, data=<optimized out>) at /home/meissner/fsf-src/trunk/gcc/passes.c:1640 #4 0x00000000109b82fc in execute_todo (flags=<optimized out>) at /home/meissner/fsf-src/trunk/gcc/passes.c:2039 #5 0x00000000109bbcc4 in execute_one_pass (pass=pass@entry=<opt_pass* 0x12230e70 "vect"(166)>) at /home/meissner/fsf-src/trunk/gcc/passes.c:2539 #6 0x00000000109bca64 in execute_pass_list_1 (pass=<opt_pass* 0x12230e70 "vect"(166)>) at /home/meissner/fsf-src/trunk/gcc/passes.c:2590 #7 0x00000000109bca7c in execute_pass_list_1 (pass=<opt_pass* 0x12230680 "loop"(145)>) at /home/meissner/fsf-src/trunk/gcc/passes.c:2591 #8 0x00000000109bca7c in execute_pass_list_1 (pass=<opt_pass* 0x1222f310 "*all_optimizations"(-1)>) at /home/meissner/fsf-src/trunk/gcc/passes.c:2591 #9 0x00000000109bcb08 in execute_pass_list (fn=<optimized out>, pass=<optimized out>) at /home/meissner/fsf-src/trunk/gcc/passes.c:2601 #10 0x0000000010474e00 in cgraph_node::expand (this=<cgraph_node * const 0x7ffff59c2d00 "decDigitsToDPD"/37>) at /home/meissner/fsf-src/trunk/gcc/context.h:48 #11 0x000000001047689c in expand_all_functions () at /home/meissner/fsf-src/trunk/gcc/cgraphunit.c:2470 #12 symbol_table::compile (this=this@entry=0x7ffff5780000) at /home/meissner/fsf-src/trunk/gcc/cgraphunit.c:2820 #13 0x000000001047a654 in symbol_table::compile (this=0x7ffff5780000) at /home/meissner/fsf-src/trunk/gcc/cgraphunit.c:3000 #14 symbol_table::finalize_compilation_unit (this=0x7ffff5780000) at /home/meissner/fsf-src/trunk/gcc/cgraphunit.c:3000 #15 0x0000000010afb2b8 in compile_file () at /home/meissner/fsf-src/trunk/gcc/toplev.c:483 #16 0x00000000101de57c in do_compile () at /home/meissner/fsf-src/trunk/gcc/toplev.c:2273 #17 toplev::main (this=0x7fffffffdc40, argc=<optimized out>, argv=<optimized out>) at /home/meissner/fsf-src/trunk/gcc/toplev.c:2412 #18 0x00000000101e0718 in main (argc=<optimized out>, argv=0x7fffffffe068) at /home/meissner/fsf-src/trunk/gcc/main.c:39 I did a pull later in the day, and I got Peter Bergner's lower-subreg patches, but it did not help with the failure. The git hash for the branch is 918b89b7623b6c42b09f37b7e3ef807d1abbabb8. I fell back to the version of the compiler I pulled on March 27th with a git hash of 71d69548a1b2c85220ac6354564fd272beb9263f, and it builds Spec 2017 gcc_r fine with my normal options (-Ofast -mveclibabi=mass -mrecip, etc.). I did a diff of the gcc/config/rs6000 files, and the following 3 files were modified: gcc/config/rs6000/rs6000-call.c gcc/config/rs6000/rs6000.c gcc/config/rs6000/rs6000.md However, if I replace these files in the 4/1 compiler, it still fails. So it does not appear to be due to PowerPC specific changes. I'm including an attachment of decimal64.i that shows the error with the -O2 -fsplit-loops -ftree-vectorize -fgnu89-inline options.