public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/115646] New: [gcc][trunk] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587
@ 2024-06-25 13:02 141242068 at smail dot nju.edu.cn
  2024-06-25 14:11 ` [Bug c/115646] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2024-06-25 13:02 UTC (permalink / raw)
  To: gcc-bugs

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.
```

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/115646] [gcc][trunk] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587
  2024-06-25 13:02 [Bug c/115646] New: [gcc][trunk] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587 141242068 at smail dot nju.edu.cn
@ 2024-06-25 14:11 ` rguenth at gcc dot gnu.org
  2024-06-26  6:55 ` cvs-commit at gcc dot gnu.org
  2024-06-26  6:57 ` [Bug tree-optimization/115646] [11/12/13/14 Regression] " rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-25 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2024-06-25
           Keywords|                            |ice-on-valid-code
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/115646] [gcc][trunk] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587
  2024-06-25 13:02 [Bug c/115646] New: [gcc][trunk] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587 141242068 at smail dot nju.edu.cn
  2024-06-25 14:11 ` [Bug c/115646] " rguenth at gcc dot gnu.org
@ 2024-06-26  6:55 ` cvs-commit at gcc dot gnu.org
  2024-06-26  6:57 ` [Bug tree-optimization/115646] [11/12/13/14 Regression] " rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-26  6:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:453b1d291d1a0f89087ad91cf6b1bed1ec68eff3

commit r15-1643-g453b1d291d1a0f89087ad91cf6b1bed1ec68eff3
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jun 25 16:13:02 2024 +0200

    tree-optimization/115646 - ICE with pow shrink-wrapping from bitfield

    The following makes analysis and transform agree on constraints.

            PR tree-optimization/115646
            * tree-call-cdce.cc (check_pow): Check for bit_sz values
            as allowed by transform.

            * gcc.dg/pr115646.c: New testcase.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/115646] [11/12/13/14 Regression] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587
  2024-06-25 13:02 [Bug c/115646] New: [gcc][trunk] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587 141242068 at smail dot nju.edu.cn
  2024-06-25 14:11 ` [Bug c/115646] " rguenth at gcc dot gnu.org
  2024-06-26  6:55 ` cvs-commit at gcc dot gnu.org
@ 2024-06-26  6:57 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-26  6:57 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |tree-optimization
   Target Milestone|---                         |11.5
      Known to work|                            |4.1.2
      Known to fail|                            |4.8.2, 7.5.0
           Priority|P3                          |P2
            Summary|[gcc][trunk] ICE in         |[11/12/13/14 Regression]
                   |gen_conditions_for_pow_int_ |ICE in
                   |base, at                    |gen_conditions_for_pow_int_
                   |tree-call-cdce.cc:587       |base, at
                   |                            |tree-call-cdce.cc:587

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-26  6:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-25 13:02 [Bug c/115646] New: [gcc][trunk] ICE in gen_conditions_for_pow_int_base, at tree-call-cdce.cc:587 141242068 at smail dot nju.edu.cn
2024-06-25 14:11 ` [Bug c/115646] " rguenth at gcc dot gnu.org
2024-06-26  6:55 ` cvs-commit at gcc dot gnu.org
2024-06-26  6:57 ` [Bug tree-optimization/115646] [11/12/13/14 Regression] " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).