Created attachment 44632 [details] Preprocessed source I see the following ICE building libstdc++ for mips64-linux-gnu. Compile with: -S -O2 -std=gnu++11 compatibility-c++0x.ii Bisecting shows it first appearing with r263962, though I don't really see what it has to do with that commit. Still fails as of r263983 (line numbers in this backtrace are from that revision). during GIMPLE pass: fnsplit /scratch/jmyers/glibc/many9/src/gcc/libstdc++-v3/src/c++11/compatibility-c++0x.cc: In function 'virtual std::error_condition std::error_category::default_error_condition(int) const': /scratch/jmyers/glibc/many9/src/gcc/libstdc++-v3/src/c++11/compatibility-c++0x.cc:256:1: internal compiler error: Segmentation fault 256 | } | ^ 0xd71e5f crash_signal /scratch/jmyers/glibc/many9/src/gcc/gcc/toplev.c:325 0x1036ca8 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) /scratch/jmyers/glibc/many9/src/gcc/gcc/tree.h:3235 0x1036ca8 decl_function_context(tree_node const*) /scratch/jmyers/glibc/many9/src/gcc/gcc/tree.c:8994 0x10d0cb7 mips_get_compress_mode /scratch/jmyers/glibc/many9/src/gcc/gcc/config/mips/mips.c:1355 0x10d1fa8 mips_set_current_function /scratch/jmyers/glibc/many9/src/gcc/gcc/config/mips/mips.c:19636 0xa6ba9b invoke_set_current_function_hook /scratch/jmyers/glibc/many9/src/gcc/gcc/function.c:4616 0xa74533 invoke_set_current_function_hook /scratch/jmyers/glibc/many9/src/gcc/gcc/function.c:4600 0xa74533 allocate_struct_function(tree_node*, bool) /scratch/jmyers/glibc/many9/src/gcc/gcc/function.c:4729 0xe05d4d initialize_cfun /scratch/jmyers/glibc/many9/src/gcc/gcc/tree-inline.c:2452 0xe05d4d tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, bool, bitmap_head*, bool, bitmap_head*, basic_block_def*) /scratch/jmyers/glibc/many9/src/gcc/gcc/tree-inline.c:5833 0x92e80c 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*) /scratch/jmyers/glibc/many9/src/gcc/gcc/cgraphclones.c:984 0x58b18c split_function /scratch/jmyers/glibc/many9/src/gcc/gcc/ipa-split.c:1330 0x14269d2 execute_split_functions /scratch/jmyers/glibc/many9/src/gcc/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.
confirmed. cced: Jan Hubicka <hubicka@ucw.cz>
Just hit it again with yesterday's trunk on the compile farm.
Does the attached patch fix the bootstrap? Index: cgraphclones.c =================================================================== --- cgraphclones.c (revision 264180) +++ cgraphclones.c (working copy) @@ -967,6 +967,8 @@ cgraph_node::create_version_clone_with_b SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); SET_DECL_RTL (new_decl, NULL); + DECL_VIRTUAL_P (new_decl) = 0; + /* When the old decl was a con-/destructor make sure the clone isn't. */ DECL_STATIC_CONSTRUCTOR (new_decl) = 0; DECL_STATIC_DESTRUCTOR (new_decl) = 0;
(In reply to Jan Hubicka from comment #3) > Does the attached patch fix the bootstrap? > Index: cgraphclones.c > =================================================================== > --- cgraphclones.c (revision 264180) > +++ cgraphclones.c (working copy) > @@ -967,6 +967,8 @@ cgraph_node::create_version_clone_with_b > SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); > SET_DECL_RTL (new_decl, NULL); > > + DECL_VIRTUAL_P (new_decl) = 0; > + > /* When the old decl was a con-/destructor make sure the clone isn't. */ > DECL_STATIC_CONSTRUCTOR (new_decl) = 0; > DECL_STATIC_DESTRUCTOR (new_decl) = 0; Yes, fixed. Thanks.
(In reply to Paul Hua from comment #4) > (In reply to Jan Hubicka from comment #3) > > Does the attached patch fix the bootstrap? > > Index: cgraphclones.c > > =================================================================== > > --- cgraphclones.c (revision 264180) > > +++ cgraphclones.c (working copy) > > @@ -967,6 +967,8 @@ cgraph_node::create_version_clone_with_b > > SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); > > SET_DECL_RTL (new_decl, NULL); > > > > + DECL_VIRTUAL_P (new_decl) = 0; > > + > > /* When the old decl was a con-/destructor make sure the clone isn't. */ > > DECL_STATIC_CONSTRUCTOR (new_decl) = 0; > > DECL_STATIC_DESTRUCTOR (new_decl) = 0; > > Yes, fixed. Thanks. Likewise for me on gcc23.
(In reply to Jan Hubicka from comment #3) > Does the attached patch fix the bootstrap? > Index: cgraphclones.c > =================================================================== > --- cgraphclones.c (revision 264180) > +++ cgraphclones.c (working copy) > @@ -967,6 +967,8 @@ cgraph_node::create_version_clone_with_b > SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); > SET_DECL_RTL (new_decl, NULL); > > + DECL_VIRTUAL_P (new_decl) = 0; > + > /* When the old decl was a con-/destructor make sure the clone isn't. */ > DECL_STATIC_CONSTRUCTOR (new_decl) = 0; > DECL_STATIC_DESTRUCTOR (new_decl) = 0; I just got round to checking this, and reached the same conclusion without realising you already made a patch. Has this been posted yet?
Author: law Date: Fri Oct 12 02:40:17 2018 New Revision: 265074 URL: https://gcc.gnu.org/viewcvs?rev=265074&root=gcc&view=rev Log: PR target/87156 * cgraphclones.c (cgraph_node::create_version_clone_with_body): Set new_decl virtual flag to zero. Modified: trunk/gcc/ChangeLog trunk/gcc/cgraphclones.c
I committed Jan's patch to the trunk.
*** Bug 87285 has been marked as a duplicate of this bug. ***