public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/107899] New: ICE in resolve_deallocate_expr, at fortran/resolve.cc:7576
@ 2022-11-28 17:59 gscfq@t-online.de
  2022-11-28 20:56 ` [Bug fortran/107899] " anlauf at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2022-11-28 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107899
           Summary: ICE in resolve_deallocate_expr, at
                    fortran/resolve.cc:7576
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :
(target instead of allocatable)


$ cat z1.f90
program p
   type t
   end type
   class(t), target :: x[:]
   if (allocated(x)) deallocate (x)
end


$ cat z2.f90
program p
   type t
   end type
   class(t), target :: x[:]
   deallocate(x)
end


$ gfortran-13-20221127 -c z1.f90 -fcoarray=lib
z1.f90:4:27:

    4 |    class(t), target :: x[:]
      |                           1
Error: Coarray variable 'x' at (1) shall not have codimensions with deferred
shape
z1.f90:5:17:

    5 |    if (allocated(x)) deallocate (x)
      |                 1
Error: 'array' argument of 'allocated' intrinsic at (1) must be ALLOCATABLE
f951: internal compiler error: Segmentation fault
0xf36d0f crash_signal
        ../../gcc/toplev.cc:314
0x87a956 resolve_deallocate_expr
        ../../gcc/fortran/resolve.cc:7576
0x87a956 resolve_allocate_deallocate
        ../../gcc/fortran/resolve.cc:8461
0x87cfac gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:12291
0x87b2ff gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:10979
0x87b658 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:11971
0x87e407 resolve_codes
        ../../gcc/fortran/resolve.cc:17628
0x87e4ce gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17663
0x866294 resolve_all_program_units
        ../../gcc/fortran/parse.cc:6631
0x866294 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6887
0x8b4d3f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

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

end of thread, other threads:[~2022-12-04 19:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 17:59 [Bug fortran/107899] New: ICE in resolve_deallocate_expr, at fortran/resolve.cc:7576 gscfq@t-online.de
2022-11-28 20:56 ` [Bug fortran/107899] " anlauf at gcc dot gnu.org
2022-12-03 18:28 ` anlauf at gcc dot gnu.org
2022-12-04 19:34 ` cvs-commit at gcc dot gnu.org
2022-12-04 19:44 ` anlauf 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).