Debian Codegraph @

gcc/testsuite/gfortran.dg/intrinsic_size_3.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
3 !
4 ! PR fortran/55852
5 !
6 ! Contributed by A. Kasahara
7 !
8 program bug
9 implicit none
10
11 Real, allocatable:: a(:)
12 integer(2) :: iszs
13
14 allocate(a(1:3))
15
16 iszs = ubound((a), 1)! Was ICEing
17 ! print*, ubound((a), 1) ! Was ICEing
18 ! print*, ubound(a, 1) ! OK
19 ! print*, lbound((a), 1) ! OK
20 ! print*, lbound(a, 1) ! OK
21
22 stop
23 end program bug
24
25 ! { dg-final { scan-tree-dump-times "iszs = \\(integer\\(kind=2\\)\\) MAX_EXPR <\\(a.dim.0..ubound - a.dim.0..lbound\\) \\+ 1, 0>;" 1 "original" } }