https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84598
Bug ID: 84598 Summary: internal compiler error: Segmentation fault (cp_default_conversion()) Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vegard.nossum at gmail dot com Target Milestone: --- Input (I know... don't ask): template<int b> __attribute__ a([] { class c, __attribute__(vector_size(operator+()))) d; Output: $ xgcc -x c++ -std=c++14 -O3 -c - <stdin>:1:31: error: expected '(' before 'a' <stdin>:1:31: error: expected '(' before 'a' <stdin>: In lambda function: <stdin>:1:45: error: expected unqualified-id before ',' token <stdin>:1:61: error: expected '(' before 'vector_size' <stdin>:1:73: error: there are no arguments to 'operator+' that depend on a template parameter, so a declaration of 'operator+' must be available [-fpermissive] <stdin>:1:73: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) <stdin>:1:88: internal compiler error: Segmentation fault 0x3138779 crash_signal /home/vegard/git/gcc/gcc/toplev.c:325 0x13c5f60 cp_default_conversion /home/vegard/git/gcc/gcc/cp/typeck.c:2134 0x1632c0b handle_vector_size_attribute /home/vegard/git/gcc/gcc/c-family/c-attribs.c:3026 0x1466155 decl_attributes(tree_node**, tree_node*, int, tree_node*) /home/vegard/git/gcc/gcc/attribs.c:670 0xbf7838 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) /home/vegard/git/gcc/gcc/cp/decl.c:10905 0xc14e88 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) /home/vegard/git/gcc/gcc/cp/decl.c:4952 0xf9cccc cp_parser_init_declarator /home/vegard/git/gcc/gcc/cp/parser.c:19534 0xfa2a97 cp_parser_simple_declaration /home/vegard/git/gcc/gcc/cp/parser.c:13009 0xfa8c88 cp_parser_block_declaration /home/vegard/git/gcc/gcc/cp/parser.c:12827 0xfab154 cp_parser_declaration_statement /home/vegard/git/gcc/gcc/cp/parser.c:12420 0xef6e13 cp_parser_statement /home/vegard/git/gcc/gcc/cp/parser.c:10869 0xefb1eb cp_parser_statement_seq_opt /home/vegard/git/gcc/gcc/cp/parser.c:11218 0xfcca31 cp_parser_lambda_body /home/vegard/git/gcc/gcc/cp/parser.c:10632 0xfcca31 cp_parser_lambda_expression /home/vegard/git/gcc/gcc/cp/parser.c:10137 0xf31764 cp_parser_primary_expression /home/vegard/git/gcc/gcc/cp/parser.c:5257 0xf7373b cp_parser_postfix_expression /home/vegard/git/gcc/gcc/cp/parser.c:7026 0xf26fa7 cp_parser_unary_expression /home/vegard/git/gcc/gcc/cp/parser.c:8281 0xebcdba cp_parser_cast_expression /home/vegard/git/gcc/gcc/cp/parser.c:9049 0xebf3e6 cp_parser_binary_expression /home/vegard/git/gcc/gcc/cp/parser.c:9150 0xec2eba cp_parser_assignment_expression /home/vegard/git/gcc/gcc/cp/parser.c:9437 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: xgcc (GCC) 8.0.1 20180204 (experimental) built from git fdae6180ad24fa6303fa046114f3e4b66b8db34d Bug doesn't seem present in 7.3. Test case reduced by C-Reduce, unfortunately I lost the original non-reduced source.