<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 - -clear-ast-before-backend segfaults when used with -print-stats"
   href="https://bugs.llvm.org/show_bug.cgi?id=52193">52193</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-clear-ast-before-backend segfaults when used with -print-stats
          </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>Driver
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>aheejin@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>aeubanks@google.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>src.c:
```
#include <stdio.h>
int main() {
  return 0;
}
```

$ clang src.c -Xclang -print-stats -Xclang -clear-ast-before-backend

```
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments:
/usr/local/google/home/aheejin/llvm-git/install.debug/bin/clang-13 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -clear-ast-before-backend -main-file-name src.c
-mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math
-mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic
-debugger-tuning=gdb
-fcoverage-compilation-dir=/usr/local/google/home/aheejin/emscripten
-resource-dir
/usr/local/google/home/aheejin/llvm-git/install.debug/lib/clang/14.0.0
-c-isystem /usr/local/google/home/aheejin/local/include -c-isystem
/usr/local/google/home/aheejin/apps/clang+llvm/include -c-isystem
/usr/local/google/home/aheejin/local/include -c-isystem
/usr/local/google/home/aheejin/apps/clang+llvm/include -c-isystem .
-cxx-isystem /usr/local/google/home/aheejin/local/include -cxx-isystem
/usr/local/google/home/aheejin/apps/clang+llvm/include -cxx-isystem
/usr/local/google/home/aheejin/local/include -cxx-isystem
/usr/local/google/home/aheejin/apps/clang+llvm/include -cxx-isystem .
-internal-isystem
/usr/local/google/home/aheejin/llvm-git/install.debug/lib/clang/14.0.0/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=/usr/local/google/home/aheejin/emscripten -ferror-limit
19 -fgnuc-version=4.2.1 -print-stats -clear-ast-before-backend -faddrsig
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/src-2ffcab.o -x c src.c
1.      <unknown> parser at unknown location
clang-13: error: unable to execute command: Segmentation fault
clang-13: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 14.0.0 (<a href="mailto:git@github.com">git@github.com</a>:aheejin/llvm-project.git
587493b441ea87f132fec680933d3628050756b8)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/google/home/aheejin/llvm-git/install.debug/bin
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>