https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87285
Bug ID: 87285 Summary: [9 Regression] ICE: SIGSEGV in tree_class_check (tree.h:3235) with -O2 -std=gnu++11 Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: mipsel-unknown-linux-gnu Build: x86_64-pc-linux-gnu Created attachment 44680 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44680&action=edit reduced testcase (from compatibility-c++0x.cc) Compiler output: $ cc1plus -O2 -std=gnu++11 testcase.C virtual a b::c() const constexpr b::b(b&&) constexpr b::b(b&&) constexpr b::b(b&&) Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> <visibility> <build_ssa_passes> <opt_local_passes>during GIMPLE pass: fnsplit testcase.C: In function 'virtual a b::c() const': testcase.C:13:1: internal compiler error: Segmentation fault 13 | } | ^ 0xe0747f crash_signal /repo/gcc-trunk/gcc/toplev.c:325 0x10c9acc tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) /repo/gcc-trunk/gcc/tree.h:3235 0x10c9acc decl_function_context(tree_node const*) /repo/gcc-trunk/gcc/tree.c:8994 0x116d247 mips_get_compress_mode /repo/gcc-trunk/gcc/config/mips/mips.c:1355 0x116e388 mips_set_current_function /repo/gcc-trunk/gcc/config/mips/mips.c:19636 0xa9939b invoke_set_current_function_hook /repo/gcc-trunk/gcc/function.c:4616 0xaa392b invoke_set_current_function_hook /repo/gcc-trunk/gcc/function.c:4600 0xaa392b allocate_struct_function(tree_node*, bool) /repo/gcc-trunk/gcc/function.c:4729 0xe9c6af initialize_cfun /repo/gcc-trunk/gcc/tree-inline.c:2452 0xe9c6af tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, bool, bitmap_head*, bool, bitmap_head*, basic_block_def*) /repo/gcc-trunk/gcc/tree-inline.c:5832 0x937b3a cgraph_node::create_version_clone_with_body(vec<cgraph_edge*, va_heap, vl_ptr>, vec<ipa_replace_map*, va_gc, vl_embed>*, bitmap_head*, bool, bitmap_head*, basic_block_def*, char const*) /repo/gcc-trunk/gcc/cgraphclones.c:983 0x1598d0d split_function /repo/gcc-trunk/gcc/ipa-split.c:1327 0x159cea8 execute_split_functions /repo/gcc-trunk/gcc/ipa-split.c:1825 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. I am failing to finish build due to this ICE. $ xgcc -v Using built-in specs. COLLECT_GCC=/repo/build-trunk-264226-checking-yes-rtl-df-extra-mipsel/gcc/xgcc Target: mipsel-unknown-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --with-sysroot=/usr/mipsel-unknown-linux-gnu --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=mipsel-unknown-linux-gnu --with-ld=/usr/bin/mipsel-unknown-linux-gnu-ld --with-as=/usr/bin/mipsel-unknown-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-264226-checking-yes-rtl-df-extra-mipsel Thread model: posix gcc version 9.0.0 20180912 (experimental) (GCC)