PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / str_comp_optimize_1.f90
blob84287b475a5f2398a0082c6a21aea3260f771fbb
1 ! { dg-do compile }
2 ! { dg-options "-ffrontend-optimize" }
4 ! PR fortran/60341
5 ! An unguarded union access was wrongly enabling a frontend optimization on a
6 ! string comparison, leading to an ICE.
8 ! Original testcase from Steve Chapel <steve.chapel@a2pg.com>.
9 ! Reduced by Steven G. Kargl <kargl@gcc.gnu.org>.
12 subroutine modelg(ncm)
13 implicit none
14 integer, parameter :: pc = 30, pm = pc - 1
15 integer i
16 character*4 catt(pm,2)
17 integer ncm,iatt(pm,pc)
18 do i=1,ncm
19 if (catt(i,1)//catt(i,2).eq.'central') exit
20 end do
21 iatt(i,4)=1
22 end