public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840
@ 2022-01-12  9:45 dcb314 at hotmail dot com
  2022-01-12 10:12 ` [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16 marxin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2022-01-12  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103987
           Summary: ice in ao_ref_init_from_ptr_and_range, at
                    tree-ssa-alias.c:840
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

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

The attached Fortran code does this:

$ ../results/bin/gfortran -c -Ofast -std=legacy -w bug787.f  2>&1 | more
during GIMPLE pass: dse
bug787.f:401:72:

  401 |       END
      |                                                                       
^
internal compiler error: in ao_ref_init_from_ptr_and_range, at
tree-ssa-alias.c:
840
0xf5d106 ao_ref_init_from_ptr_and_range(ao_ref*, tree_node*, bool, poly_int<1u, 
long>, poly_int<1u, long>, poly_int<1u, long>)
        ../../trunk.git/gcc/tree-ssa-alias.c:840

The bug hash existed since sometime before git hash 973f6aedeb6489a9,
dated 20211214.

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

* [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
  2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
@ 2022-01-12 10:12 ` marxin at gcc dot gnu.org
  2022-01-12 10:13 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-12 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ice in                      |[12 Regression] ice in
                   |ao_ref_init_from_ptr_and_ra |ao_ref_init_from_ptr_and_ra
                   |nge, at                     |nge, at
                   |tree-ssa-alias.c:840        |tree-ssa-alias.c:840 since
                   |                            |r12-5236-g5aa91072e24c1e16
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2022-01-12
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5236-g5aa91072e24c1e16.

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

* [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
  2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
  2022-01-12 10:12 ` [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16 marxin at gcc dot gnu.org
@ 2022-01-12 10:13 ` rguenth at gcc dot gnu.org
  2022-01-12 10:15 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-12 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
           Priority|P3                          |P1

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

* [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
  2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
  2022-01-12 10:12 ` [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16 marxin at gcc dot gnu.org
  2022-01-12 10:13 ` rguenth at gcc dot gnu.org
@ 2022-01-12 10:15 ` marxin at gcc dot gnu.org
  2022-01-12 10:19 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-12 10:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

$ cat pr103987.f
      CHARACTER*(*) LTYPE, PTYPE, DEFNAM
      PARAMETER (LTYPE=
     1'GIF   (Graphics Interchange Format file, landscape orientation)',
     2 PTYPE=
     3'VGIF  (Graphics Interchange Format file, portrait orientation)')
      PARAMETER (DEFNAM='pgplot.gif')
      IF (PIXMAP.NE.0)
     :     CALL GRGI01(IX0, IY0, IX0, IY0, IC, BX, BY, %VAL(PIXMAP))
      END
      SUBROUTINE GRGI01 (IX0, IY0, IX1, IY1, ICOL, BX, BY, PIXMAP)
      INTEGER ICOL, BX, BY
      BYTE PIXMAP(BX,BY)
      IF (ICOL.GT.127) THEN
         PIXMAP(IX0,IY0)=VAL
      ELSE IF (ABS(IY1-IY0).GT.ABS(IX1-IX0)) THEN
            PIXMAP(IX,IY)=VAL
      END IF
      END

(note one needs the leading whitespaces).

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

* [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
  2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2022-01-12 10:15 ` marxin at gcc dot gnu.org
@ 2022-01-12 10:19 ` rguenth at gcc dot gnu.org
  2022-01-12 10:23 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-12 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
# .MEM_261 = VDEF <.MEM_195>
grgi03 (&C.4661, &C.4662, &bx, &by, &C.4663, &bx, &by, pixmap.86_80);

and the param we're asking for is pixmap.86_80, nothing checks for a
POINTER_TYPE here before using ao_ref_init_from_ptr_and_range.

Of course the question is why we have info for this parameter?  I guess
the type mismatch diagnostics tell the source isn't 1:1 up to speed here.

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

* [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
  2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2022-01-12 10:19 ` rguenth at gcc dot gnu.org
@ 2022-01-12 10:23 ` rguenth at gcc dot gnu.org
  2022-01-18 12:23 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-12 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
C testcase:

void foo();

void bar(int i)
{
  foo (i);
}

void foo(int *p)
{
  *p = 0;
}

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

* [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
  2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2022-01-12 10:23 ` rguenth at gcc dot gnu.org
@ 2022-01-18 12:23 ` rguenth at gcc dot gnu.org
  2022-01-18 13:33 ` cvs-commit at gcc dot gnu.org
  2022-01-18 13:33 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-18 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I am testing a patch.

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

* [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
  2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2022-01-18 12:23 ` rguenth at gcc dot gnu.org
@ 2022-01-18 13:33 ` cvs-commit at gcc dot gnu.org
  2022-01-18 13:33 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-18 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS 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:3ed40db0f12994e64434dc2e0590ba1da7ba5f60

commit r12-6672-g3ed40db0f12994e64434dc2e0590ba1da7ba5f60
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jan 18 13:26:22 2022 +0100

    tree-optimization/103987 - guard DSE modref query

    This adds a missing guard for a pointer to the DSE modref query,
    otherwise we can end up invoking APIs desired to only work on
    pointers on non-pointers when there are mismatches between declared
    and actual arguments of functions in the program.

    2022-01-18  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/103987
            * tree-ssa-dse.cc (dse_optimize_call): Properly guard modref
            query with a pointer check.

            * gcc.dg/torture/pr103987.c: New testcase.

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

* [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16
  2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2022-01-18 13:33 ` cvs-commit at gcc dot gnu.org
@ 2022-01-18 13:33 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-18 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-01-18 13:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  9:45 [Bug fortran/103987] New: ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 dcb314 at hotmail dot com
2022-01-12 10:12 ` [Bug middle-end/103987] [12 Regression] ice in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:840 since r12-5236-g5aa91072e24c1e16 marxin at gcc dot gnu.org
2022-01-12 10:13 ` rguenth at gcc dot gnu.org
2022-01-12 10:15 ` marxin at gcc dot gnu.org
2022-01-12 10:19 ` rguenth at gcc dot gnu.org
2022-01-12 10:23 ` rguenth at gcc dot gnu.org
2022-01-18 12:23 ` rguenth at gcc dot gnu.org
2022-01-18 13:33 ` cvs-commit at gcc dot gnu.org
2022-01-18 13:33 ` 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).