<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ICE with -O1 on valid code: fatal error: error in backend: cannot lower memory intrinsic in address space 256"
   href="https://bugs.llvm.org/show_bug.cgi?id=50837">50837</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ICE with -O1 on valid code: fatal error: error in backend: cannot lower memory intrinsic in address space 256
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cnsun@uwaterloo.ca
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ clang-trunk -v
clang version 13.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
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 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
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:

********************</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>