https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96546
Bug ID: 96546 Summary: [10/11] internal compiler error: in default_conversion Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: anbu1024.me at gmail dot com Target Milestone: --- $ cat test.c void foo () {} __attribute__ ( ( constructor ( foo ) ) ) void bar () { return 0 ; } ------------------------------------------------------------------------------- $ gcc-snapshot11 --version gcc (GCC) 11.0.0 20200802 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ------------------------------------------------------------------------------- $ gcc-snapshot11 test.c test.c:4:1: internal compiler error: in default_conversion, at c/c-typeck.c:2185 4 | __attribute__ ( ( constructor ( foo ) ) ) void bar () { return 0 ; } | ^~~~~~~~~~~~~ 0x5fcc39 default_conversion(tree_node*) ../../gcc-11-20200802/gcc/c/c-typeck.c:2185 0x8d7896 get_priority ../../gcc-11-20200802/gcc/c-family/c-attribs.c:1571 0x8d7ace handle_constructor_attribute ../../gcc-11-20200802/gcc/c-family/c-attribs.c:1622 0x7e61e7 decl_attributes(tree_node**, tree_node*, int, tree_node*) ../../gcc-11-20200802/gcc/attribs.c:714 0x802a35 start_function(c_declspecs*, c_declarator*, tree_node*) ../../gcc-11-20200802/gcc/c/c-decl.c:9184 0x85d226 c_parser_declaration_or_fndef ../../gcc-11-20200802/gcc/c/c-parser.c:2434 0x866893 c_parser_external_declaration ../../gcc-11-20200802/gcc/c/c-parser.c:1773 0x867389 c_parser_translation_unit ../../gcc-11-20200802/gcc/c/c-parser.c:1646 0x867389 c_parse_file() ../../gcc-11-20200802/gcc/c/c-parser.c:21812 0x8c020d c_common_parse_file() ../../gcc-11-20200802/gcc/c-family/c-opts.c:1188 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. ------------------------------------------------------------------------------- $ gcc-snapshot10 --version gcc (GCC) 10.2.1 20200725 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ------------------------------------------------------------------------------- $ gcc-snapshot10 test.c test.c:4:1: internal compiler error: in default_conversion, at c/c-typeck.c:2182 4 | __attribute__ ( ( constructor ( foo ) ) ) void bar () { return 0 ; } | ^~~~~~~~~~~~~ 0x59e720 default_conversion(tree_node*) ../../gcc-10-20200725/gcc/c/c-typeck.c:2182 0x6a61ac get_priority ../../gcc-10-20200725/gcc/c-family/c-attribs.c:1571 0x6a7d1f handle_constructor_attribute ../../gcc-10-20200725/gcc/c-family/c-attribs.c:1622 0x5e26e5 decl_attributes(tree_node**, tree_node*, int, tree_node*) ../../gcc-10-20200725/gcc/attribs.c:714 0x5f94e0 start_function(c_declspecs*, c_declarator*, tree_node*) ../../gcc-10-20200725/gcc/c/c-decl.c:9153 0x641be2 c_parser_declaration_or_fndef ../../gcc-10-20200725/gcc/c/c-parser.c:2406 0x649723 c_parser_external_declaration ../../gcc-10-20200725/gcc/c/c-parser.c:1745 0x64a221 c_parser_translation_unit ../../gcc-10-20200725/gcc/c/c-parser.c:1618 0x64a221 c_parse_file() ../../gcc-10-20200725/gcc/c/c-parser.c:21745 0x69440b c_common_parse_file() ../../gcc-10-20200725/gcc/c-family/c-opts.c:1190 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.