[llvm-bugs] [Bug 50837] New: ICE with -O1 on valid code: fatal error: error in backend: cannot lower memory intrinsic in address space 256

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 23 20:23:29 PDT 2021


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

            Bug ID: 50837
           Summary: ICE with -O1 on valid code: fatal error: error in
                    backend: cannot lower memory intrinsic in address
                    space 256
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: cnsun at uwaterloo.ca
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

$ 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
i(char __seg_gs *arr, c, n) {
  for (long i = 0; i < n; ++i)
    arr[i] = c;
}

$ clang-trunk -O1 mutant.c
mutant.c:1:23: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
i(char __seg_gs *arr, c, n) {
                      ^
mutant.c:1:26: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
i(char __seg_gs *arr, c, n) {
                         ^
mutant.c:1:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
i(char __seg_gs *arr, c, n) {
^
mutant.c:4:1: warning: non-void function does not return a value
[-Wreturn-type]
}
^
fatal error: error in backend: cannot lower memory intrinsic in address space
256
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-1bdfcf.c
clang-13: note: diagnostic msg: /tmp/mutant-1bdfcf.sh
clang-13: note: diagnostic msg:

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210624/7ba3360a/attachment-0001.html>


More information about the llvm-bugs mailing list