annotate gcc/testsuite/gfortran.dg/PR19754_2.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! Test of Steve Kargl's fix to PR19754
kono
parents:
diff changeset
3 ! This exercises bugs that the original patch caused
kono
parents:
diff changeset
4 !
kono
parents:
diff changeset
5 program PR19754_2
kono
parents:
diff changeset
6 real a(2,2), b(2,2),c(2,2),d(2,2)
kono
parents:
diff changeset
7 integer i(2,2),j(2,2),k(2,2)
kono
parents:
diff changeset
8 a = 1. ; b = 2. ; i = 4
kono
parents:
diff changeset
9 c = b - floor( a / b ) ! this caused an ICE
kono
parents:
diff changeset
10 d = b - real(floor( a / b ))
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
11 if (any (c/=d)) STOP 1
111
kono
parents:
diff changeset
12 j = aint(b) - floor( a / b ) ! this caused an ICE
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
13 if (any(real(j)/=d)) STOP 2
111
kono
parents:
diff changeset
14 c = i
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
15 if (any(real(i)/=c)) STOP 3
111
kono
parents:
diff changeset
16 c = i + b ! this caused an ICE
kono
parents:
diff changeset
17 d = real(i) + b
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
18 if (any(c/=d)) STOP 4
111
kono
parents:
diff changeset
19 j = i + aint (a)
kono
parents:
diff changeset
20 k = i + a ! this caused an ICE
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
21 if (any(j/=k)) STOP 5
111
kono
parents:
diff changeset
22 end program PR19754_2