Debian Codegraph @

gcc/testsuite/gfortran.dg/zero_sized_7.f90

raw
1 ! { dg-do compile }
2 ! PR 80118 - this used to ICE
3 ! Original test case by Marco Restelli
4 module m
5 implicit none
6
7 integer, parameter :: not_empty(1) = 0
8 integer, parameter :: empty1(0) = (/integer :: /)
9 integer, parameter :: empty2(0) = 0
10
11 contains
12
13 subroutine sub(v)
14 integer, allocatable, intent(out) :: v(:)
15 v = 2*empty2 ! internal compiler error
16 end subroutine sub
17
18 end module m