* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr71523_2.f90
blob5be0dd798818fc7c40e4f5843e3ad1cf20059286
1 ! PR Fortran/71523
3 ! { dg-do run }
4 ! { dg-options "-finit-integer=12345 -fautomatic -fmax-stack-var-size=8" }
6 ! Make sure that variables larger than max-stack-var-size become
7 ! static and are given the correct _static_ initializer.
10 function set(idx, val)
11 implicit none
12 integer, intent(in) :: idx, val
13 integer set
14 integer arr(100)
16 set = arr(idx)
17 arr(idx) = val
18 return
19 end function
21 integer set, val
23 val = set(1, 5)
24 if (val .ne. 12345) then
25 call abort()
26 endif
28 val = set(1, 10)
29 if (val .ne. 5) then
30 call abort()
31 endif
33 val = set(1, 100)
34 if (val .ne. 10) then
35 call abort()
36 endif
38 end