https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79015

Ralf <allizgubccg at reallysoft dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |allizgubccg at reallysoft dot 
de

--- Comment #2 from Ralf <allizgubccg at reallysoft dot de> ---
I encounter very similar internal compiler errors for several source files and
with several gcc version (tested: 5.5, 6.3 and 7.1).

The affected functions contain huge amounts of generated test code. 
Starting with gcc 7.1 the compilation times for some of these modules raised up
to several minutes, so I tried to disable optimization for the test code to
reduce compile times.

For compilations done with -O1 up to-O3 and -Wdisabled-optimization I get the
following warnings
--------------------
adquery.cxx: In function 'void TEST_DB_search()':
adquery.cxx:936: warning: const/copy propagation disabled: 8163 basic blocks
and 57756 registers [-Wdisabled-optimization]
adquery.cxx:936: warning: PRE disabled: 8163 basic blocks and 57756 registers
[-Wdisabled-optimization]
adquery.cxx:936: warning: const/copy propagation disabled: 8163 basic blocks
and 57756 registers [-Wdisabled-optimization]
adquery.cxx:936: warning: const/copy propagation disabled: 8163 basic blocks
and 57756 registers [-Wdisabled-optimization]
--------------------

To disable the unneeded, time-consuming optimization I've attributed the
functions where these warnings occurred with
   __attribute__((optimize("no-var-tracking")))
which caused gcc to terminate with:
--------------------
adquery.cxx:936:1: internal compiler error: in get_insn_template, at
final.c:2124
0x8583f6 get_insn_template(int, rtx_def*)
        ../../gcc-5.5.0/gcc/final.c:2124
0x85a9ba final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
        ../../gcc-5.5.0/gcc/final.c:2986
0x85b2c9 final(rtx_insn*, _IO_FILE*, int)
        ../../gcc-5.5.0/gcc/final.c:2089
0x85b71b rest_of_handle_final
        ../../gcc-5.5.0/gcc/final.c:4488
0x85b71b execute
        ../../gcc-5.5.0/gcc/final.c:4563
Please submit a full bug report, ...
--------------------

Adding a second attribute
   __attribute__((optimize("no-var-tracking-assignments")))
made the problem disappear reproducible.

Reply via email to