https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83987
Bug ID: 83987 Summary: [6/7/8 Regression] ICE with OpenMP, sanitizer and virtual bases Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, lto, openmp Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org CC: marxin at gcc dot gnu.org Target Milestone: --- The following valid code snippet triggers an ICE since GCC 6.1.0 when compiled with "-fsanitize=undefined -flto -fopenmp": =========================================== struct A { int i; }; struct B : virtual A { void foo(); }; void B::foo() { #pragma omp sections lastprivate (i) { i = 0; } } =========================================== bug.cc: In member function 'B::foo()': bug.cc:21:1: internal compiler error: tree code 'call_expr' is not supported in LTO streams } ^ 0xd7d163 lto_write_tree ../../gcc/gcc/lto-streamer-out.c:442 0xd7d163 lto_output_tree_1 ../../gcc/gcc/lto-streamer-out.c:483 0xd7d163 DFS::DFS(output_block*, tree_node*, bool, bool, bool) ../../gcc/gcc/lto-streamer-out.c:670 0xd7e06d lto_output_tree(output_block*, tree_node*, bool, bool) ../../gcc/gcc/lto-streamer-out.c:1642 0xd7bc51 output_struct_function_base ../../gcc/gcc/lto-streamer-out.c:2019 0xd7bc51 output_function ../../gcc/gcc/lto-streamer-out.c:2124 0xd7bc51 lto_output() ../../gcc/gcc/lto-streamer-out.c:2419 0xdd9c3e write_lto ../../gcc/gcc/passes.c:2610 0xddd32e ipa_write_summaries_1 ../../gcc/gcc/passes.c:2674 0xddd32e ipa_write_summaries() ../../gcc/gcc/passes.c:2734 0xae5bc2 ipa_passes ../../gcc/gcc/cgraphunit.c:2468 0xae5bc2 symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2558 0xae7be9 symbol_table::compile() ../../gcc/gcc/cgraphunit.c:2537 0xae7be9 symbol_table::finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2717 Please submit a full bug report, [etc.] Before GCC 6, the code was rejected.