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

            Bug ID: 115646
           Summary: [gcc][trunk] ICE in gen_conditions_for_pow_int_base,
                    at tree-call-cdce.cc:587
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 141242068 at smail dot nju.edu.cn
  Target Milestone: ---

Compiler explorer: https://gcc.godbolt.org/z/rax1zezbc

The testing program:
```
#include <math.h>

struct S {
    unsigned int a : 3, b : 8, c : 21;
};

void foo (struct S *p)
{
  pow(p->c, 42);
}
```

When compiling it using gcc-trunk with option `-O2`, gcc crashes:
```
during GIMPLE pass: cdce
<source>: In function 'foo':
<source>:7:6: internal compiler error: in gen_conditions_for_pow_int_base, at
tree-call-cdce.cc:587
    7 | void foo (struct S *p)
      |      ^~~
0x23be10c internal_error(char const*, ...)
        ???:0
0x986355 fancy_abort(char const*, int, char const*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```

Reply via email to