1! { dg-do compile } 2! { dg-options "-fdump-tree-original" } 3! 4! PR fortran/55852 5! 6! Contributed by A. Kasahara 7! 8program 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 23end program bug 24 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" } } 26