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

    <tr>
        <th>Summary</th>
        <td>
            runtime Segmentfault with "break-crit-edges,mem2reg,newgvn,structurizecfg"
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    *******************************************************************************
OS and Platform:
Ubuntu 20.04.4 LTS
*******************************************************************************
clang version:
$ clang -v
clang version 17.0.3
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/llvm-releases/llvm-17.0.3/build/bin
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/9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
*******************************************************************************
Command Lines:
$ clang -O3 -mllvm -disable-llvm-optzns -c -emit-llvm a.c -o a.bc -I ~/csmith/include/csmith-2.3.0/
$ opt -passes=break-crit-edges,mem2reg,newgvn,structurizecfg a.bc -o a.opt.bc
$ clang a.opt.bc -o a.out
$ ./a.out
Segmentation fault (core dumped)
*******************************************************************************
Source Code:
```C
int a ;
static int b() {          
    int *c[6] = {}; 
    for (;;) {           
        short d[7];           
 int e;           
        for (e = 0;e < 7;e++)d[e] = 1; 
        for (;0;) {            
            int f; 
            if (a)continue;                 
        }           
 {
            int g ;            
            if (d[6]) 
                if (d[4])           
                    break; 
        }        
    }    
    return 0;    
}
int main() {          
    int e;          
    b();          
    e = 0; 
    for (;e < 6;)      
        for (;e < 7;e++);
    return 0; 
}

```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkV1tvozgU_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