https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116764

            Bug ID: 116764
           Summary: SIGSEGV in C
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yunboni at smail dot nju.edu.cn
  Target Milestone: ---

Created attachment 59137
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59137&action=edit
The preprocessed file

When I compiled this code with `gcc case.c -o case` and run `./case`, it gave
SIGSEGV.

```c
#include<stdint.h>
int *a;
int d;
int b() {
    for (int c = 0;;)
      a[c] = d;
    return 1;
}
int64_t e() { 
    int32_t f[b()]; 
    return f[0]; 
}
int main() { 
    e(); 
    return 0;    
}
```

My gcc version is:
Using built-in specs.
COLLECT_GCC=/home/yunbo/eval/compilers/gcc_latest/bin/gcc
COLLECT_LTO_WRAPPER=/home/yunbo/eval/compilers/gcc_latest/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/home/yunbo/eval/compilers/gcc_latest
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240912 (experimental) (GCC)
  • [Bug c/116764] New: SIGSEGV i... yunboni at smail dot nju.edu.cn via Gcc-bugs

Reply via email to