[Bug c++/84588] internal compiler error: Segmentation fault (contains_struct_check())
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 27 16:33:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84588
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-02-27
CC| |dmalcolm at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to Vegard Nossum from comment #0)
> Please let me know if it is useful to continue submitting new bugs or if I
> should post new findings under the same bug number even though the
> crash/input looks different.
Thanks for filing this (and the other bugs!).
Please open separate bug reports when the crash/input look different: if they
are duplicates we can mark them as such, but if they aren't, having them under
the same bug number makes it harder to talk about them.
Confirmed.
The "-O3" isn't necessary to trigger the crash.
The first testcase crashes here:
#1 0x00000000009e7ec5 in cp_parser_ctor_initializer_opt_and_function_body
(parser=0x7ffff7ffbbd0, in_function_try_block=false)
at ../../src/gcc/cp/parser.c:21770
21770 DECL_CONSTRUCTOR_P (current_function_decl)
due to "current_function_decl" being NULL.
The crash in cp_parser_ctor_initializer_opt_and_function_body started in
r251433 (with -std=c++14), but I'm able to reproduce a crash with the first
testcase within start_lambda_scope with -std=c++11, which started with r204714.
The second testcase is a different crash; it's a failure of this assertion:
970 gcc_checking_assert (length () > 0);
(gdb) bt
#0 fancy_abort (file=0x20fcd7c "../../src/gcc/vec.h", line=970,
function=0x20fd5f7 <vec<tree_node*, va_gc, vl_embed>::pop()::__FUNCTION__>
"pop") at ../../src/gcc/diagnostic.c:1500
#1 0x000000000082f972 in vec<tree_node*, va_gc, vl_embed>::pop
(this=0x7ffff1a09028) at ../../src/gcc/vec.h:970
#2 0x0000000000bd5b1c in pop_stmt_list (t=<tree 0x0>) at
../../src/gcc/c-family/c-semantics.c:60
#3 0x0000000000ac2e6c in finish_cond (cond_p=0x7ffff18b90c0,
expr=<function_decl 0x7ffff1a07300 a>)
at ../../src/gcc/cp/semantics.c:561
#4 0x0000000000ac3753 in finish_if_stmt_cond (cond=<function_decl
0x7ffff1a07300 a>, if_stmt=<if_stmt 0x7ffff18b90a8>)
at ../../src/gcc/cp/semantics.c:740
#5 0x00000000009d2bba in cp_parser_selection_statement (parser=0x7ffff7ffbbd0,
if_p=0x0, chain=0x0)
at ../../src/gcc/cp/parser.c:11379
This one started with r208426.
More information about the Gcc-bugs
mailing list