https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85016
Bug ID: 85016 Summary: internal compiler error: side-effects element in no-side-effects CONSTRUCTOR Product: gcc Version: 8.0.1 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vegard.nossum at oracle dot com CC: webrown.cpp at gmail dot com Target Milestone: --- Input: constexpr volatile b(;) >> ; __attribute__((d(>> [] { struct { int c << } a[] { b } }))) << Output: $ cc1plus <stdin>:1:21: error: ISO C++ forbids declaration of 'b' with no type [-fpermissive] <stdin>:1:22: error: expected primary-expression before ';' token <stdin>:1:23: error: expected unqualified-id before ')' token <stdin>:2:18: error: expected primary-expression before '>>' token <lambda()> <stdin>:4:9: error: expected ';' at end of member declaration <stdin>:4:11: error: expected unqualified-id before '<<' token <stdin>:7:3: internal compiler error: side-effects element in no-side-effects CONSTRUCTOR 0x40096e3 verify_constructor_flags(tree_node*) /home/vegard/git/gcc/gcc/tree.c:2007 0xa310e4 cxx_eval_constant_expression /home/vegard/git/gcc/gcc/cp/constexpr.c:4531 0xa4996a cxx_eval_outermost_constant_expr /home/vegard/git/gcc/gcc/cp/constexpr.c:4832 0xa57256 maybe_constant_value(tree_node*, tree_node*) /home/vegard/git/gcc/gcc/cp/constexpr.c:5049 0x1423653 massage_init_elt /home/vegard/git/gcc/gcc/cp/typeck2.c:1254 0x142417f process_init_constructor_array /home/vegard/git/gcc/gcc/cp/typeck2.c:1320 0x141db7c process_init_constructor /home/vegard/git/gcc/gcc/cp/typeck2.c:1711 0x141db7c digest_init_r /home/vegard/git/gcc/gcc/cp/typeck2.c:1148 0x142ad1a digest_init_flags(tree_node*, tree_node*, int, int) /home/vegard/git/gcc/gcc/cp/typeck2.c:1193 0x142ad1a store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) /home/vegard/git/gcc/gcc/cp/typeck2.c:814 0xb45618 check_initializer /home/vegard/git/gcc/gcc/cp/decl.c:6424 0xbd954e cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) /home/vegard/git/gcc/gcc/cp/decl.c:7078 0xfa0a29 cp_parser_init_declarator /home/vegard/git/gcc/gcc/cp/parser.c:19731 0xfa57a7 cp_parser_simple_declaration /home/vegard/git/gcc/gcc/cp/parser.c:13065 0xfab998 cp_parser_block_declaration /home/vegard/git/gcc/gcc/cp/parser.c:12883 0xfade64 cp_parser_declaration_statement /home/vegard/git/gcc/gcc/cp/parser.c:12476 0xefab2b cp_parser_statement /home/vegard/git/gcc/gcc/cp/parser.c:10925 0xefe5eb cp_parser_statement_seq_opt /home/vegard/git/gcc/gcc/cp/parser.c:11274 0xfcf4c5 cp_parser_lambda_body /home/vegard/git/gcc/gcc/cp/parser.c:10685 0xfcf4c5 cp_parser_lambda_expression /home/vegard/git/gcc/gcc/cp/parser.c:10186 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. Version: GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu) I tried to massage it into something a little better, but this is all I could do: constexpr volatile b(;) >> 0; __attribute__((d(0 >> [] { struct { int c; } a[] { b, }; })));