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

            Bug ID: 116811
           Summary: internal compiler error: verify_ssa failed
           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 59180
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59180&action=edit
The preprocessed file when using -O3

When I compiled this code with -O2/O3 flag, it crashed:

```c
#include <stdint.h>
int a, i;
uint8_t **j, **k;
long b(long unsigned c, int d) {
  if (c == 0)
    return 0;
  long unsigned e = (c + d - 1) / d;
  a = 0;
  for (; a < e; a++)
    ;
  return 0;
}
void f(int, int g, int h) { b(g, h); }
int32_t *l();
static uint64_t m(int32_t *, uint8_t, int32_t *);
int32_t *n();
static int16_t o() { int32_t *p = l(m(n(), **j, 0)); p = p; return 0;}
uint64_t m(int32_t *, uint8_t q, int32_t *) {
  **k = i || q;
  f(0, q - 1, q + 1);
  return 0;
}
int main() { o(); }
```

The backtrace is:
0x24e1215 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
        ???:0
0x24f48f5 internal_error(char const*, ...)
        ???:0
0x1348b6d verify_ssa(bool, bool)
        ???:0

Note: When I add type conversion on line 9 like: for (; a < (int)e; a++), it
didn't crash.
  • [Bug c/116811] New: internal ... yunboni at smail dot nju.edu.cn via Gcc-bugs

Reply via email to