https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91421

            Bug ID: 91421
           Summary: [10 Regression] runtime error: load of value 2463,
                    which is not a valid value for type
                    'built_in_function' since r274119
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rsandifo at gcc dot gnu.org
  Target Milestone: ---

Since the revision I see following UBSAN error:

$ /home/marxin/Programming/gcc2/objdir/./gcc/xgcc
-B/home/marxin/Programming/gcc2/objdir/./gcc/ -xc -nostdinc /dev/null -S -o
/dev/null -fself-test=../../gcc/testsuite/selftests
../../gcc/langhooks.c:623:3: runtime error: load of value 2463, which is not a
valid value for type 'built_in_function'
    #0 0x186eae8 in add_builtin_function_common ../../gcc/langhooks.c:623
    #1 0x186ec32 in add_builtin_function(char const*, tree_node*, int,
built_in_class, char const*, tree_node*) ../../gcc/langhooks.c:653
    #2 0x2d344d3 in def_builtin ../../gcc/config/i386/i386-builtins.c:282
    #3 0x2d34b90 in def_builtin_const ../../gcc/config/i386/i386-builtins.c:311
    #4 0x2d36210 in ix86_init_mmx_sse_builtins
../../gcc/config/i386/i386-builtins.c:529
    #5 0x2d39916 in ix86_init_builtins()
../../gcc/config/i386/i386-builtins.c:1406
    #6 0xad3794 in c_define_builtins ../../gcc/c-family/c-common.c:3974
    #7 0xad895d in c_common_nodes_and_builtins()
../../gcc/c-family/c-common.c:4462
    #8 0x8bb205 in c_init_decl_processing() ../../gcc/c/c-decl.c:4360
    #9 0x9ca9cb in c_objc_common_init() ../../gcc/c/c-objc-common.c:60
    #10 0x20944c6 in lang_dependent_init ../../gcc/toplev.c:1915
    #11 0x2095989 in do_compile ../../gcc/toplev.c:2175
    #12 0x2096089 in toplev::main(int, char**) ../../gcc/toplev.c:2325
    #13 0x453e21a in main ../../gcc/main.c:39
    #14 0x7ff69f230bca in __libc_start_main ../csu/libc-start.c:308
    #15 0x87d969 in _start
(/home/marxin/Programming/gcc2/objdir/gcc/cc1+0x87d969)

../../gcc/selftest.c:392: test_locate_file: FAIL: unable to open file:
../../gcc/testsuite/selftests/example.txt
cc1: internal compiler error: in fail_formatted, at selftest.c:63
0x45b2147 selftest::fail_formatted(selftest::location const&, char const*, ...)
        ../../gcc/selftest.c:63
0x45b29e8 selftest::read_file(selftest::location const&, char const*)
        ../../gcc/selftest.c:225
0x45b3879 test_locate_file
        ../../gcc/selftest.c:392
0x45b3917 selftest::selftest_c_tests()
        ../../gcc/selftest.c:407
0x442f07f selftest::run_tests()
        ../../gcc/selftest-run-tests.c:57
0x2095da3 toplev::run_self_tests()
        ../../gcc/toplev.c:2254
Please submit a full bug report,

The compiler is build with:
make -j16 all-host -k CFLAGS="-O0 -g -fsanitize=undefined -ldl" CXXFLAGS="-O0
-g -fsanitize=undefined" LDFLAGS="-fsanitize=undefined -ldl"

The issue is obvious, the target-specific builtin names are not part of the
'enum built_in_function'.

Reply via email to