https://bugs.llvm.org/show_bug.cgi?id=50824

            Bug ID: 50824
           Summary: ICE: fatal error: error in backend: Cannot select:
                    intrinsic %llvm.thread.pointer
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

$ clang-trunk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
5c8659801a4976ef2b327f4071d98086efd42a36)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$ cat mutant.c
get_tp() { return __builtin_thread_pointer(); }

$ clang-trunk  mutant.c
mutant.c:1:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
get_tp() { return __builtin_thread_pointer(); }
^
mutant.c:1:19: warning: incompatible pointer to integer conversion returning
'void *' from a function with result type 'int' [-Wint-conversion]
get_tp() { return __builtin_thread_pointer(); }
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: error in backend: Cannot select: intrinsic %llvm.thread.pointer
clang-13: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
5c8659801a4976ef2b327f4071d98086efd42a36)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
clang-13: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg: /tmp/mutant-0e66db.c
clang-13: note: diagnostic msg: /tmp/mutant-0e66db.sh
clang-13: note: diagnostic msg:

********************

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to