public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076
@ 2021-09-13 17:30 gscfq@t-online.de
  2021-09-14  7:03 ` [Bug fortran/102314] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2021-09-13 17:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102314
           Summary: [11/12 Regression] ICE in verify_ssa, at
                    tree-ssa.c:1076
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Changed between 20210606 and 20210613 :


$ cat z1.f90
program p
   character(:), allocatable :: y
   call s(y)
   !$omp target
   y = 'abc'
   !$omp end target
contains
   subroutine s(x)
      character(:), allocatable :: x
      x = '123'
   end
end


$ gfortran-12-20210905 -c z1.f90 -fopenmp -O0
$
$ gfortran-12-20210905 -c z1.f90 -fopenmp -O2
during GIMPLE pass: ccp
z1.f90:4:15:

    4 |    !$omp target
      |               ^
internal compiler error: Segmentation fault
0xd09e4f crash_signal
        ../../gcc/toplev.c:328
0xde9ef1 gimple_code
        ../../gcc/gimple.h:1803
0xde9ef1 gimple_nop_p
        ../../gcc/gimple.h:6673
0xde9ef1 get_default_value
        ../../gcc/tree-ssa-ccp.c:283
0xdea60a get_value
        ../../gcc/tree-ssa-ccp.c:376
0xdea60a ccp_finalize
        ../../gcc/tree-ssa-ccp.c:992
0xdeac64 do_ssa_ccp
        ../../gcc/tree-ssa-ccp.c:2960
0xdeac64 execute
        ../../gcc/tree-ssa-ccp.c:3003

---

$ gfortran-12-20210905 -c z1.f90 -fopenmp   # with --enable-checking=yes
during GIMPLE pass: ssa
z1.f90:4:15:

    4 |    !$omp target
      |               ^
internal compiler error: Segmentation fault
0xeace0f crash_signal
        ../../gcc/toplev.c:328
0x11327f0 verify_ssa(bool, bool)
        ../../gcc/tree-ssa.c:1076
0xdb3187 execute_function_todo
        ../../gcc/passes.c:2049
0xdb3ef2 execute_todo
        ../../gcc/passes.c:2096

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

* [Bug fortran/102314] [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076
  2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
@ 2021-09-14  7:03 ` rguenth at gcc dot gnu.org
  2021-09-14  7:26 ` [Bug fortran/102314] [12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-14  7:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-09-14
   Target Milestone|---                         |12.0
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  There's a not released SSA name in the IL that does not have a def
stmt.  The issue is once again a type that wasn't properly gimplified:

(gdb) p debug_generic_expr (new_tree)
character(kind=1)[1:.y]

with TYPE_SIZE being

SAVE_EXPR <(bitsizetype) (sizetype) .y.5_2 * 8>

there's a DECL_EXPR missing for this variable.

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

* [Bug fortran/102314] [12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d
  2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
  2021-09-14  7:03 ` [Bug fortran/102314] " rguenth at gcc dot gnu.org
@ 2021-09-14  7:26 ` marxin at gcc dot gnu.org
  2022-01-20 10:01 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-14  7:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
            Summary|[11/12 Regression] ICE in   |[12 Regression] ICE in
                   |verify_ssa, at              |verify_ssa, at
                   |tree-ssa.c:1076             |tree-ssa.c:1076 since
                   |                            |r12-1319-gd4d38135b3137f1d

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-1319-gd4d38135b3137f1d.

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

* [Bug fortran/102314] [12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d
  2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
  2021-09-14  7:03 ` [Bug fortran/102314] " rguenth at gcc dot gnu.org
  2021-09-14  7:26 ` [Bug fortran/102314] [12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d marxin at gcc dot gnu.org
@ 2022-01-20 10:01 ` rguenth at gcc dot gnu.org
  2022-03-22 13:58 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-20 10:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug fortran/102314] [12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d
  2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2022-01-20 10:01 ` rguenth at gcc dot gnu.org
@ 2022-03-22 13:58 ` jakub at gcc dot gnu.org
  2022-03-22 14:13 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-22 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think those types:
  character(kind=1)[1:.y] * y;
don't really make sense for the character(:) allocatables, I think much better
would be to leave the TYPE_MAX_VALUE from TYPE_DOMAIN out, making it [1:].
[1:.y] nicely expresses the intent, in most places y (if it is not NULL) should
point to [1:.y] array.  But if we emit a DECL_EXPR for it, it will be just
wrong,
the middle-end expects the C/C++ VLA behavior, the size is computed once (when
encountering the DECL_EXPR), then the VLA is allocated with it and that is the
size it has from that point on.
The deferred-length (is that the right term) arrays work differently from this
though, the length can be changed at any time.  So the VLA length is always
determined from the current value of the .y variable (except in the short spots
where that is updated and the var not yet reallocated).

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

* [Bug fortran/102314] [12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d
  2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2022-03-22 13:58 ` jakub at gcc dot gnu.org
@ 2022-03-22 14:13 ` jakub at gcc dot gnu.org
  2022-04-04 13:06 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-22 14:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Though, if we make those arrays incomplete, gfc_omp_finish_clause will need to
figure out what size to use.  This is in:
  if (OMP_CLAUSE_SIZE (c) == NULL_TREE)
    OMP_CLAUSE_SIZE (c)
      = DECL_P (decl) ? DECL_SIZE_UNIT (decl)
                      : TYPE_SIZE_UNIT (TREE_TYPE (decl));
  if (gimplify_expr (&OMP_CLAUSE_SIZE (c), pre_p,
                     NULL, is_gimple_val, fb_rvalue) == GS_ERROR)
    OMP_CLAUSE_SIZE (c) = size_int (0);
and the gimplify_expr part is what my change added.  We'll need to check some
Fortran specific type flags etc. to see it is a deferred-length character and
find the corresponding . variable, though TYPE_LANG_SPECIFIC is NULL on the
ARRAY_TYPE created by gfc_get_character_type_len_for_eltype -> build_array_type
it seems.

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

* [Bug fortran/102314] [12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d
  2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2022-03-22 14:13 ` jakub at gcc dot gnu.org
@ 2022-04-04 13:06 ` rguenth at gcc dot gnu.org
  2022-05-06  8:31 ` [Bug fortran/102314] [12/13 " jakub at gcc dot gnu.org
  2023-05-08 12:22 ` [Bug fortran/102314] [12/13/14 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d – with deferred-length character variable rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-04 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fortran FE -> P4.

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

* [Bug fortran/102314] [12/13 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d
  2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2022-04-04 13:06 ` rguenth at gcc dot gnu.org
@ 2022-05-06  8:31 ` jakub at gcc dot gnu.org
  2023-05-08 12:22 ` [Bug fortran/102314] [12/13/14 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d – with deferred-length character variable rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.0                        |12.2

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.

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

* [Bug fortran/102314] [12/13/14 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d – with deferred-length character variable
  2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
                   ` (6 preceding siblings ...)
  2022-05-06  8:31 ` [Bug fortran/102314] [12/13 " jakub at gcc dot gnu.org
@ 2023-05-08 12:22 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.3                        |12.4

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.

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

end of thread, other threads:[~2023-05-08 12:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 17:30 [Bug fortran/102314] New: [11/12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 gscfq@t-online.de
2021-09-14  7:03 ` [Bug fortran/102314] " rguenth at gcc dot gnu.org
2021-09-14  7:26 ` [Bug fortran/102314] [12 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d marxin at gcc dot gnu.org
2022-01-20 10:01 ` rguenth at gcc dot gnu.org
2022-03-22 13:58 ` jakub at gcc dot gnu.org
2022-03-22 14:13 ` jakub at gcc dot gnu.org
2022-04-04 13:06 ` rguenth at gcc dot gnu.org
2022-05-06  8:31 ` [Bug fortran/102314] [12/13 " jakub at gcc dot gnu.org
2023-05-08 12:22 ` [Bug fortran/102314] [12/13/14 Regression] ICE in verify_ssa, at tree-ssa.c:1076 since r12-1319-gd4d38135b3137f1d – with deferred-length character variable 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).