111
|
1 ! { dg-do run }
|
|
2 ! Test of Steve Kargl's fix to PR19754
|
|
3 ! This exercises bugs that the original patch caused
|
|
4 !
|
|
5 program PR19754_2
|
|
6 real a(2,2), b(2,2),c(2,2),d(2,2)
|
|
7 integer i(2,2),j(2,2),k(2,2)
|
|
8 a = 1. ; b = 2. ; i = 4
|
|
9 c = b - floor( a / b ) ! this caused an ICE
|
|
10 d = b - real(floor( a / b ))
|
131
|
11 if (any (c/=d)) STOP 1
|
111
|
12 j = aint(b) - floor( a / b ) ! this caused an ICE
|
131
|
13 if (any(real(j)/=d)) STOP 2
|
111
|
14 c = i
|
131
|
15 if (any(real(i)/=c)) STOP 3
|
111
|
16 c = i + b ! this caused an ICE
|
|
17 d = real(i) + b
|
131
|
18 if (any(c/=d)) STOP 4
|
111
|
19 j = i + aint (a)
|
|
20 k = i + a ! this caused an ICE
|
131
|
21 if (any(j/=k)) STOP 5
|
111
|
22 end program PR19754_2
|