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

    <tr>
        <th>Summary</th>
        <td>
            clang-20 crashed with noderef attribute. unsupported TypeLoc kind in declarator! UNREACHABLE executed at /root/llvm-project/clang/lib/Sema/SemaType.cpp:6235!
        </td>
    </tr>

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

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

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

<pre>
    clang-20 crashed with ```noderef``` attribute.

Compiler explorer: https://godbolt.org/z/Mbf9GTEEe

```
$cat mutant.c
int *_Atomic a __attribute__((noderef));
```

Also crashed at Clang-19.

```
$clang-19 mutant.c
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/lib/llvm-19/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name mutant.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/code/reduce -fcoverage-compilation-dir=/home/code/reduce -resource-dir /usr/lib/llvm-19/lib/clang/19 -internal-isystem /usr/lib/llvm-19/lib/clang/19/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/mutant-e62bec.o -x c mutant.c
1.      mutant.c:1:40: current parser token ';'
#0 0x00007fb9c1f6b246 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm-19/bin/../lib/libLLVM.so.19.0+0xea7246)
#1 0x00007fb9c1f68e20 llvm::sys::RunSignalHandlers() (/usr/lib/llvm-19/bin/../lib/libLLVM.so.19.0+0xea4e20)
#2 0x00007fb9c1f6b90b (/usr/lib/llvm-19/bin/../lib/libLLVM.so.19.0+0xea790b)
#3 0x00007fb9c0ba3520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007fb9caa59c59 (/usr/lib/llvm-19/bin/../lib/libclang-cpp.so.19.0+0x1e03c59)
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Ubuntu clang version 19.0.0 (++20240722031324+65825cd5431c-1~exp1~20240722151445.1819)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin
clang: note: diagnostic msg: 
********************

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

********************
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysV9tu27jTfxrmZkBBouTThS-c2G4LpNsgSXcvDYocydxQpMBD6nwX--wfKMtOmqbddv81DB2Go5kfh3Pk3qvWIC7J5JJM1hc8hr11S8U7bqx56mz0wl_UVj4theampSwH4bjfo4QvKuyBTPPj31iJDpvzO_AQnKpjwIzka5Kvjtcr2_VKowM89No6dKRcwT6E3pNyRdiWsG1rZW11yKxrCdv-H2Hbj3WzeHe_2eBLSWdN4yurBA_QxcBNyMSRqEwAwla7VbCdEsBhtzvD2u0ImxM2PwFni_QvL9-WPlxX2tvz9nmAq8EkxSL7F1wj2ytwN9eb1d0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