2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / intrinsic_size_3.f90
blob923cbc3473d5189b6dd79c3887d612e73905c5a3
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/55852
6 ! Contributed by A. Kasahara
8 program bug
9 implicit none
11 Real, allocatable:: a(:)
12 integer(2) :: iszs
14 allocate(a(1:3))
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
22 stop
23 end program bug
25 ! { dg-final { scan-tree-dump-times "iszs = \\(integer\\(kind=2\\)\\) MAX_EXPR <\\(D.\[0-9\]+->dim.0..ubound - D.\[0-9\]+->dim.0..lbound\\) \\+ 1, 0>;" 1 "original" } }