public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/94377] New: Won't compile when deallocating a parameterized derived type
@ 2020-03-28  2:43 siteg at mathalacarte dot com
  2020-03-28  4:35 ` [Bug fortran/94377] " kargl at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: siteg at mathalacarte dot com @ 2020-03-28  2:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94377
           Summary: Won't compile when deallocating a parameterized
                    derived type
           Product: gcc
           Version: 9.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: siteg at mathalacarte dot com
  Target Milestone: ---

Below is the code with the problem.

program pdt
  type :: av_t(n)
    integer, len :: n
    integer :: i
    real :: c
    real :: u(n)
  end type av_t
  type(av_t(:), allocatable :: av(:)
  integer :: k2, k3
  k2 = 3
  k3 = 5
contains
  subroutine al_test(k)
    integer, intent(in) :: k
    integer :: ista
    if (k == 1)  then
      allocate ( av_t(k2) :: av(k3), stat=ista) ! For this ista not needed
      return
    else
      deallocate(av, stat=ista)
    end if
  end subroutine al_test
end program pdt

Here is the compilation.

gfortran -g -o pdt pdt.f90
pdt.f90:20:0:

   20 |       deallocate(av, stat=ista)
      | 
internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2755
0x7f446356f1a2 __libc_start_main
        ../csu/libc-start.c:308

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

end of thread, other threads:[~2024-03-20 22:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28  2:43 [Bug fortran/94377] New: Won't compile when deallocating a parameterized derived type siteg at mathalacarte dot com
2020-03-28  4:35 ` [Bug fortran/94377] " kargl at gcc dot gnu.org
2020-03-28 22:12 ` siteg at mathalacarte dot com
2020-04-01 16:12 ` siteg at mathalacarte dot com
2020-04-28 19:50 ` siteg at mathalacarte dot com
2020-06-09 16:46 ` dominiq at lps dot ens.fr
2024-03-20 22:06 ` [Bug fortran/94377] [PDT] ICE " 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).