[Bug c/58287] New: internal compiler error: in c_builtin_function_ext_scope

jacek at codeweavers dot com gcc-bugzilla@gcc.gnu.org
Sat Aug 31 12:17:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58287

            Bug ID: 58287
           Summary: internal compiler error: in
                    c_builtin_function_ext_scope
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jacek at codeweavers dot com

This is with trunk version. I found it during mingw-w64-crt compilation, but my
simplified test case crashes x86_64-unknown-linux-gnu as well. The test case is
as trivial as:

extern unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int);
#pragma GCC target("sse4.2")

and the backtrace is:

 #pragma GCC target("sse4.2")
         ^
0x518de2 c_builtin_function_ext_scope(tree_node*)
        ../../gcc-git/gcc/c/c-decl.c:3633
0x81d720 add_builtin_function_common
        ../../gcc-git/gcc/langhooks.c:561
0x81e373 add_builtin_function_ext_scope(char const*, tree_node*, int,
built_in_class, char const*, tree_node*)
        ../../gcc-git/gcc/langhooks.c:597
0xb92b38 ix86_add_new_builtins
        ../../gcc-git/gcc/config/i386/i386.c:27368
0xb92b38 ix86_valid_target_attribute_tree(tree_node*)
        ../../gcc-git/gcc/config/i386/i386.c:4631
0x5d137c ix86_pragma_target_parse
        ../../gcc-git/gcc/config/i386/i386-c.c:393
0x5b73cd handle_pragma_target
        ../../gcc-git/gcc/c-family/c-pragma.c:805
0x55596f c_parser_pragma
        ../../gcc-git/gcc/c/c-parser.c:8972
0x5675ab c_parser_external_declaration
        ../../gcc-git/gcc/c/c-parser.c:1345
0x568066 c_parser_translation_unit
        ../../gcc-git/gcc/c/c-parser.c:1251
0x568066 c_parse_file()
        ../../gcc-git/gcc/c/c-parser.c:11223
0x5b4f14 c_common_parse_file()
        ../../gcc-git/gcc/c-family/c-opts.c:1046



More information about the Gcc-bugs mailing list