Debian Codegraph @

gcc/testsuite/gfortran.dg/storage_size_4.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
3 !
4 ! PR fortran/57553
5 !
6 ! Ensure that there is no ICE and that compile-time simplication works.
7 !
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) STOP 1
13 if ( ESize2/CHARACTER_STORAGE_SIZE /= 2) STOP 2
14 end
15
16 subroutine S ( A )
17 character(len=*), intent(in) :: A
18 integer :: ESize = 4
19 esize = ( storage_size(a) + 7 ) / 8
20 end
21
22 ! { dg-final { scan-tree-dump-not "_gfortran_stop" "original" } }