<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56593>56593</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            question: miscompilation, sanitizer issue, or expected behavior?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          zhendongsu
      </td>
    </tr>
</table>

<pre>
    Not quite sure whether this is a bug or not as the code has a side-effect-free infinite loop (which is UB).

```
[504] % clangtk -v
clang version 15.0.0 (https://github.com/llvm/llvm-project.git c52d447713cdc61b3c32888dd30a9725b3d0ee78)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64
[505] % 
[505] % clangtk -O1 small.c
[506] % ./a.out
0
0
Segmentation fault
[507] % 
[507] % clangtk -O1 -fsanitize=address small.c
[508] % ./a.out
0
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer: nested bug in the same thread, aborting.
[509] % 
[509] % cat small.c
int printf(const char *, ...);
int a;
int main() {
  goto L2;
 L1:
  a = 1;
  while (a)
    ;
 L2:
  printf("0\n");
  goto L1;
  return 0;
}
```
</pre>
<img width="1px" height="1px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