<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62447>62447</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-16: error: unable to execute command: Segmentation fault (core dumped)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
anbu1024
</td>
</tr>
</table>
<pre>
```
$ clang apple.c
apple.c:4:18: error: member reference base type 'char' is not a structure or union
char x[((sizeof(d.data) == 8)];
~^~~~~
apple.c:4:30: error: expected ')'
char x[((sizeof(d.data) == 8)];
^
apple.c:4:8: note: to match this '('
char x[((sizeof(d.data) == 8)];
^
apple.c:5:18: error: member reference base type 'char' is not a structure or union
char x[((sizeof(d.data)) == 8)];
~^~~~~
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: clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-16 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name apple.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 -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fcoverage-compilation-dir=/path-to -resource-dir clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/clang/16 -internal-isystem /clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/clang/16/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir=/path-to -ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/apple-ac2848.o -x c apple.c
1. apple.c:5:32: current parser token ';'
clang-16: error: unable to execute command: Segmentation fault (core dumped)
clang-16: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 16.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin
clang-16: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-16: note: diagnostic msg: /tmp/apple-44ca8f.c
clang-16: note: diagnostic msg: /tmp/apple-44ca8f.sh
clang-16: note: diagnostic msg:
********************
$ cat /tmp/apple-44ca8f.c
# 1 "<built-in>"
# 1 "apple.c"
char d;
char x[((sizeof(d.data) == 8)];
char x[((sizeof(d.data)) == 8)];
--------------------------------
$ clang --version
clang version 16.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /path-to/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin
--------------------------------
$ cat /tmp/apple-44ca8f.sh
# Crash reproducer for clang version 16.0.0
# Driver args: "apple.c"
# Original command: "clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-16" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "apple.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" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/path-to" "-resource-dir" "clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/clang/16" "-internal-isystem" "clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/clang/16/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=/path-to" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "/tmp/apple-ac2848.o" "-x" "c" "apple.c"
"clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-16" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "apple.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" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/path-to" "-fdebug-compilation-dir=/path-to" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-x" "c" "apple-44ca8f.c"
--------------------------------
This is not a regression bug.
Clang-14 crashes with information "error: unable to execute command: Trace/breakpoint trap (core dumped)"
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWVtv2zry_zTMy4CGTMm3Bz84cdwW6P-fosnueQwoaiTzRCIFXlJ3H_LZF9TNceKkaZzdxS6OYdjWzJAzHM7lR5pbKwuFuCSTczJZn3HvttosuUr9OGLJWaqzn0sSrUm0ItOoe7ePL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