https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92029
Bug ID: 92029 Summary: Regression: 'libgomp.fortran/pr90779.f90' ICE for nvptx offloading Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: openmp Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: jakub at gcc dot gnu.org, rguenth at gcc dot gnu.org Target Milestone: --- With r273435 "Support folding from array ctor spanning multiple elements", I'm seeing a regression with nvptx offloading: [-PASS:-]{+FAIL: libgomp.fortran/pr90779.f90 -O (internal compiler error)+} {+FAIL:+} libgomp.fortran/pr90779.f90 -O (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.fortran/pr90779.f90 -O [-execution test-]{+compilation failed to produce executable+} lto1: internal compiler error: Segmentation fault 0xb51d7f crash_signal [...]/source-gcc/gcc/toplev.c:326 0x9bd8c2 input_offload_tables(bool) [...]/source-gcc/gcc/lto-cgraph.c:1786 0x5d7a6b read_cgraph_and_symbols(unsigned int, char const**) [...]/source-gcc/gcc/lto/lto-common.c:2796 0x5b9bb2 lto_main() [...]/source-gcc/gcc/lto/lto.c:622 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. mkoffload: fatal error: [...]/install/offload-nvptx-none/bin//x86_64-pc-linux-gnu-accel-nvptx-none-gcc returned 1 exit status That's 'gcc/lto-cgraph.c': 1776 else if (tag == LTO_symtab_variable) 1777 { 1778 int decl_index = streamer_read_uhwi (ib); 1779 tree var_decl 1780 = lto_file_decl_data_get_var_decl (file_data, decl_index); 1781 vec_safe_push (offload_vars, var_decl); 1782 1783 /* Prevent IPA from removing var_decl as unused, since there 1784 may be no refs to var_decl in offload LTO mode. */ 1785 if (do_force_output) 1786 varpool_node::get (var_decl)->force_output = 1; With pre-requisite r274114 and then r273435 reverted, the ICE disappears.