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

            Bug ID: 117427
           Summary: internal compiler error: verify_gimple failed with
                    O2/3
           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 59526
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59526&action=edit
Preprocessed source using -freport-bug

When I compiled this code with -O2/3 flag, it generated internal compiler
error:

```c
int a, b;
int *c;
long d;
int e(int g) {
  if (g && a)
    return 1;
  return 0;
}
void h() {
  int f = e(d);
  b = f;
  for (unsigned long i = 0; i < d; i++)
    c[i] = 0;
}
```

The gcc version I used is: gcc version 15.0.0 20241030 (experimental) (GCC)

Error:

simple.c: In function 'h':
simple.c:9:6: error: type mismatch in binary expression
    9 | void h() {
      |      ^
sizetype

long int

sizetype

_17 = d.1_1 - _6;
during GIMPLE pass: ldist
simple.c:9:6: internal compiler error: verify_gimple failed
0x2583895 internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:518
0x113728e verify_gimple_in_cfg(function*, bool, bool)
        ../../gcc/tree-cfg.cc:5682
0xfb2f20 execute_function_todo
        ../../gcc/passes.cc:2102
0xfb349b execute_todo
        ../../gcc/passes.cc:2156
  • [Bug c/117427] New: internal ... yunboni at smail dot nju.edu.cn via Gcc-bugs

Reply via email to