[AArch64] Merge stores of D-register values with different modes
[official-gcc.git] / gcc / testsuite / gfortran.dg / module_parameter_array_refs_2.f90
blob7324ff6c51e62c3b52f16cc75016ddb7e7aa0cfc
1 ! { dg-do compile }
2 ! { dg-options "-O" }
3 ! { dg-final { scan-assembler-not "i_am_optimized_away" } }
5 ! PR fortran/50960
7 ! PARAMETER arrays and derived types exists as static variables.
8 ! Check that the their read-only nature is taken into account
9 ! when optimizations are done.
12 module m
13 integer, parameter :: PARA(*) = [1,2,3,4,5,6,7,8,9,10]
14 end module m
16 subroutine test()
17 use m
18 integer :: i
19 i = 1
20 if (para(i) /= 1) call i_am_optimized_away()
21 end