PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / storage_size_4.f90
blobb66dcb9eec626b5375666eac2b56d32e80c9ec87
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/57553
6 ! Ensure that there is no ICE and that compile-time simplication works.
8 use iso_fortran_env
9 implicit none
10 integer, parameter :: ESize = storage_size('a')
11 integer, parameter :: ESize2 = storage_size('aa')
12 if ( ESize/CHARACTER_STORAGE_SIZE /= 1) call abort()
13 if ( ESize2/CHARACTER_STORAGE_SIZE /= 2) call abort()
14 end
16 subroutine S ( A )
17 character(len=*), intent(in) :: A
18 integer :: ESize = 4
19 esize = ( storage_size(a) + 7 ) / 8
20 end
22 ! { dg-final { scan-tree-dump-not "abort" "original" } }