https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84349
Bug ID: 84349 Summary: [6/7/8 Regression] ICE with auto in function cast Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following invalid code snippet triggers an ICE since GCC 4.9.0: ==================================== void* p; int i = (*(int(*)(auto)) p)(0); ==================================== bug.cc:2:30: internal compiler error: Segmentation fault int i = (*(int(*)(auto)) p)(0); ^ 0xeb087f crash_signal ../../gcc/gcc/toplev.c:325 0x8d81fb vec<tree_int, va_gc, vl_embed>::last() ../../gcc/gcc/vec.h:837 0x8d81fb finish_lambda_scope() ../../gcc/gcc/cp/lambda.c:1357 0x934afd cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:19650 0x93bac8 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:13038 0x93c8d8 cp_parser_block_declaration ../../gcc/gcc/cp/parser.c:12863 0x940832 cp_parser_declaration ../../gcc/gcc/cp/parser.c:12761 0x940c41 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:12637 0x940f34 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4559 0x940f34 c_parse_file() ../../gcc/gcc/cp/parser.c:38857 0xa3f566 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1132 Please submit a full bug report, [etc.]