https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77321
Bug ID: 77321 Summary: [7 Regression] crash in warn_for_memset Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org Target Milestone: --- markus@x4 /tmp % cat crash.ii template <typename> void foo() { auto &a(); __builtin_memset(a, 'X', 4); } markus@x4 /tmp % g++ -c -Wall crash.ii crash.ii: In function ‘void foo()’: crash.ii:3:29: internal compiler error: Segmentation fault __builtin_memset(a, 'X', 4); ^ 0xd7904f crash_signal ../../gcc/gcc/toplev.c:335 0x7f13dc06dc2f ??? /home/markus/glibc/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x8cc6ca warn_for_memset(unsigned int, tree_node*, tree_node*, int) ../../gcc/gcc/c-family/c-common.c:11994 0x75efcf cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6878 0x75ceac cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:8019 0x766e87 cp_parser_cast_expression ../../gcc/gcc/cp/parser.c:8696 0x76741d cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:8797 0x767ce0 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:9084 0x76a66a cp_parser_expression ../../gcc/gcc/cp/parser.c:9253 0x76ac13 cp_parser_expression_statement ../../gcc/gcc/cp/parser.c:10736 0x77a5cc cp_parser_statement ../../gcc/gcc/cp/parser.c:10587 0x77b664 cp_parser_statement_seq_opt ../../gcc/gcc/cp/parser.c:10859 0x77b76f cp_parser_compound_statement ../../gcc/gcc/cp/parser.c:10813 0x77b8cd cp_parser_function_body ../../gcc/gcc/cp/parser.c:20832 0x77b8cd cp_parser_ctor_initializer_opt_and_function_body ../../gcc/gcc/cp/parser.c:20868 0x77c381 cp_parser_function_definition_after_declarator ../../gcc/gcc/cp/parser.c:25565 0x77d131 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/gcc/cp/parser.c:25477 0x77d131 cp_parser_init_declarator ../../gcc/gcc/cp/parser.c:18603 0x77e5b7 cp_parser_single_declaration ../../gcc/gcc/cp/parser.c:26021 0x77e6dc cp_parser_template_declaration_after_parameters ../../gcc/gcc/cp/parser.c:25626 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.