public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204
@ 2022-07-25  7:24 dcb314 at hotmail dot com
  2022-07-25  8:00 ` [Bug c/106432] " dcb314 at hotmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2022-07-25  7:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106432
           Summary: ice in range_on_edge, at gimple-range.cc:204
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 53344
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53344&action=edit
C source code

The attached partially reduced C code does this with compiler flag -O3:

$ ../results.20220724.asan.ubsan/bin/gcc -c -O3 bug831.c 2>&1 | more
during GIMPLE pass: dom
/home/dcb36/rpmbuild/BUILD/petsc-3.16.3/petsc-3.16.3/src/ts/utils/dmplexlandau/p
lexland.c: In function ‘ProcessOptions’:
/home/dcb36/rpmbuild/BUILD/petsc-3.16.3/petsc-3.16.3/src/ts/utils/dmplexlandau/p
lexland.c:1418:23: internal compiler error: in range_on_edge, at
gimple-range.cc
:204
 1418 | static PetscErrorCode ProcessOptions(LandauCtx *ctx, const char
prefix[]
)
      |                       ^~~~~~~~~~~~~~
0x1bec52d gimple_ranger::range_on_edge(vrange&, edge_def*, tree_node*)
        ../../trunk.git/gcc/gimple-range.cc:204

The problem first seems to occur sometime in the git hash range
1cc0e9a46e79e7cc..8b8103dcd2624936, a distance of 24 commits.

I will finish the reduce and post it.

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

* [Bug c/106432] ice in range_on_edge, at gimple-range.cc:204
  2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
@ 2022-07-25  8:00 ` dcb314 at hotmail dot com
  2022-07-25  9:37 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2022-07-25  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
Reduced C code is:

typedef struct {
  double masses[0];
  int species_offset[];
} LandauCtx;
LandauCtx ProcessOptions_ctx;
ProcessOptions_ctx_2;
LandauCreateVelocitySpace_v0_grid[];
LandauCreateVelocitySpace() {
  int PetscOptionsObject_0 = 0;
  for (;;)
    for (int grid; ProcessOptions_ctx_2; grid++)
      LandauCreateVelocitySpace_v0_grid[grid] *= sqrt(
          ProcessOptions_ctx.masses[ProcessOptions_ctx.species_offset[grid]]);
}

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

* [Bug c/106432] ice in range_on_edge, at gimple-range.cc:204
  2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
  2022-07-25  8:00 ` [Bug c/106432] " dcb314 at hotmail dot com
@ 2022-07-25  9:37 ` rguenth at gcc dot gnu.org
  2022-07-25 12:35 ` aldyh at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-25  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-07-25
           Keywords|                            |ice-on-valid-code,
                   |                            |needs-bisection
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |aldyh at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

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

* [Bug c/106432] ice in range_on_edge, at gimple-range.cc:204
  2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
  2022-07-25  8:00 ` [Bug c/106432] " dcb314 at hotmail dot com
  2022-07-25  9:37 ` rguenth at gcc dot gnu.org
@ 2022-07-25 12:35 ` aldyh at gcc dot gnu.org
  2022-07-25 12:36 ` aldyh at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2022-07-25 12:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Created attachment 53346
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53346&action=edit
untested patch

Ughhh, mine.

We need to check if we support ranges of the given type before we query the
ranger.  In this case we're asking for the range of a double, which is
unsupported in trunk.

Patch in testing.

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

* [Bug c/106432] ice in range_on_edge, at gimple-range.cc:204
  2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2022-07-25 12:35 ` aldyh at gcc dot gnu.org
@ 2022-07-25 12:36 ` aldyh at gcc dot gnu.org
  2022-07-25 14:09 ` [Bug middle-end/106432] [13 Regression] ICE in range_on_edge, at gimple-range.cc:204 since r13-1812-ge850c98f1f067211 marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2022-07-25 12:36 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |aldyh at gcc dot gnu.org

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Mine.

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

* [Bug middle-end/106432] [13 Regression] ICE in range_on_edge, at gimple-range.cc:204 since r13-1812-ge850c98f1f067211
  2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2022-07-25 12:36 ` aldyh at gcc dot gnu.org
@ 2022-07-25 14:09 ` marxin at gcc dot gnu.org
  2022-07-25 14:56 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-25 14:09 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
                 CC|                            |marxin at gcc dot gnu.org
            Summary|ice in range_on_edge, at    |[13 Regression] ICE in
                   |gimple-range.cc:204         |range_on_edge, at
                   |                            |gimple-range.cc:204 since
                   |                            |r13-1812-ge850c98f1f067211

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Btw. started with r13-1812-ge850c98f1f067211.

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

* [Bug middle-end/106432] [13 Regression] ICE in range_on_edge, at gimple-range.cc:204 since r13-1812-ge850c98f1f067211
  2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2022-07-25 14:09 ` [Bug middle-end/106432] [13 Regression] ICE in range_on_edge, at gimple-range.cc:204 since r13-1812-ge850c98f1f067211 marxin at gcc dot gnu.org
@ 2022-07-25 14:56 ` rguenth at gcc dot gnu.org
  2022-07-25 15:31 ` cvs-commit at gcc dot gnu.org
  2022-07-25 15:32 ` aldyh at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-25 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|12.0                        |13.0
   Target Milestone|---                         |13.0

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

* [Bug middle-end/106432] [13 Regression] ICE in range_on_edge, at gimple-range.cc:204 since r13-1812-ge850c98f1f067211
  2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2022-07-25 14:56 ` rguenth at gcc dot gnu.org
@ 2022-07-25 15:31 ` cvs-commit at gcc dot gnu.org
  2022-07-25 15:32 ` aldyh at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-25 15:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>:

https://gcc.gnu.org/g:ca1e4b26c19351077db1d8e6ff1cb97f05bca79f

commit r13-1825-gca1e4b26c19351077db1d8e6ff1cb97f05bca79f
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Mon Jul 25 15:58:04 2022 +0200

    [PR middle-end/106432] Gracefully handle unsupported type in range_on_edge

    A cleaner approach to fix this PR has been suggested by Andrew, which
    is to just return false on range_on_edge for unsupported range types.

    Tested on x86-64 Linux.

            PR middle-end/106432

    gcc/ChangeLog:

            * gimple-range.cc (gimple_ranger::range_on_edge): Return false
            when the result range type is unsupported.

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

* [Bug middle-end/106432] [13 Regression] ICE in range_on_edge, at gimple-range.cc:204 since r13-1812-ge850c98f1f067211
  2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2022-07-25 15:31 ` cvs-commit at gcc dot gnu.org
@ 2022-07-25 15:32 ` aldyh at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu.org @ 2022-07-25 15:32 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
fixed

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

end of thread, other threads:[~2022-07-25 15:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25  7:24 [Bug c/106432] New: ice in range_on_edge, at gimple-range.cc:204 dcb314 at hotmail dot com
2022-07-25  8:00 ` [Bug c/106432] " dcb314 at hotmail dot com
2022-07-25  9:37 ` rguenth at gcc dot gnu.org
2022-07-25 12:35 ` aldyh at gcc dot gnu.org
2022-07-25 12:36 ` aldyh at gcc dot gnu.org
2022-07-25 14:09 ` [Bug middle-end/106432] [13 Regression] ICE in range_on_edge, at gimple-range.cc:204 since r13-1812-ge850c98f1f067211 marxin at gcc dot gnu.org
2022-07-25 14:56 ` rguenth at gcc dot gnu.org
2022-07-25 15:31 ` cvs-commit at gcc dot gnu.org
2022-07-25 15:32 ` aldyh 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).