mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 12:47:32 +08:00
Call abort where appropriate.
From-SVN: r19742
This commit is contained in:
parent
1a057f3bc0
commit
b38b42d205
@ -6,9 +6,9 @@
|
||||
|
||||
z0 = cmplx(3.,4.)
|
||||
r0 = cabs(z0)
|
||||
if (r0 .ne. 5.) call exit(1)
|
||||
if (r0 .ne. 5.) call abort
|
||||
|
||||
z1 = dcmplx(3.d0,4.d0)
|
||||
r1 = zabs(z1)
|
||||
if (r1 .ne. 5.d0) call exit(1)
|
||||
if (r1 .ne. 5.d0) call abort
|
||||
end
|
||||
|
@ -6,8 +6,8 @@
|
||||
k=1
|
||||
n=2
|
||||
ind=k-n+2
|
||||
if (ind /= 1) call exit(1)
|
||||
if (ab(ind) /= 1) call exit(1)
|
||||
if (k-n+2 /= 1) call exit(1)
|
||||
if (ab(k-n+2) /= 1) call exit(1)
|
||||
if (ind /= 1) call abort
|
||||
if (ab(ind) /= 1) call abort
|
||||
if (k-n+2 /= 1) call abort
|
||||
if (ab(k-n+2) /= 1) call abort
|
||||
END
|
||||
|
@ -3,16 +3,16 @@
|
||||
|
||||
z0 = cmplx(0.,.5)
|
||||
z1 = 1./z0
|
||||
if (z1 .ne. cmplx(0.,-2)) call exit(1)
|
||||
if (z1 .ne. cmplx(0.,-2)) call abort
|
||||
|
||||
z0 = 10.*z0
|
||||
if (z0 .ne. cmplx(0.,5.)) call exit(1)
|
||||
if (z0 .ne. cmplx(0.,5.)) call abort
|
||||
|
||||
z2 = cmplx(1.,2.)
|
||||
z1 = z0/z2
|
||||
if (z1 .ne. cmplx(2.,1.)) call exit(1)
|
||||
if (z1 .ne. cmplx(2.,1.)) call abort
|
||||
|
||||
z1 = z0*z2
|
||||
if (z1 .ne. cmplx(-10.,5.)) call exit(1)
|
||||
if (z1 .ne. cmplx(-10.,5.)) call abort
|
||||
end
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
! Some versions of cpp will delete "//'World' as a C++ comment.
|
||||
character*40 title
|
||||
title = 'Hello '//'World'
|
||||
if (title .ne. 'Hello World') stop 1
|
||||
if (title .ne. 'Hello World') call abort
|
||||
end
|
||||
|
@ -3,16 +3,16 @@
|
||||
|
||||
z0 = dcmplx(0.,.5)
|
||||
z1 = 1./z0
|
||||
if (z1 .ne. dcmplx(0.,-2)) call exit(1)
|
||||
if (z1 .ne. dcmplx(0.,-2)) call abort
|
||||
|
||||
z0 = 10.*z0
|
||||
if (z0 .ne. dcmplx(0.,5.)) call exit(1)
|
||||
if (z0 .ne. dcmplx(0.,5.)) call abort
|
||||
|
||||
z2 = cmplx(1.,2.)
|
||||
z1 = z0/z2
|
||||
if (z1 .ne. dcmplx(2.,1.)) call exit(1)
|
||||
if (z1 .ne. dcmplx(2.,1.)) call abort
|
||||
|
||||
z1 = z0*z2
|
||||
if (z1 .ne. dcmplx(-10.,5.)) call exit(1)
|
||||
if (z1 .ne. dcmplx(-10.,5.)) call abort
|
||||
end
|
||||
|
||||
|
@ -19,7 +19,7 @@ c current Netlib BLAS.)
|
||||
do i=1,100
|
||||
a(i)=0.D0
|
||||
enddo
|
||||
if (dnrm2(100,a,1) .ne. 0.0) call exit(1)
|
||||
if (dnrm2(100,a,1) .ne. 0.0) call abort
|
||||
end
|
||||
|
||||
double precision function dnrm2 ( n, dx, incx)
|
||||
|
@ -3,27 +3,27 @@ c============================================== test.f
|
||||
real*8 x1, y1
|
||||
x=0.
|
||||
y = erfc(x)
|
||||
if (y .ne. 1.) call exit(1)
|
||||
if (y .ne. 1.) call abort
|
||||
|
||||
x=1.1
|
||||
y = erfc(x)
|
||||
if (abs(y - .1197949) .ge. 1.e-6) call exit(1)
|
||||
if (abs(y - .1197949) .ge. 1.e-6) call abort
|
||||
|
||||
x=10
|
||||
y = erfc(x)
|
||||
if (y .gt. 1.5e-44) call exit(1)
|
||||
if (y .gt. 1.5e-44) call abort
|
||||
|
||||
x1=0.
|
||||
y1 = erfc(x1)
|
||||
if (y1 .ne. 1.) call exit(1)
|
||||
if (y1 .ne. 1.) call abort
|
||||
|
||||
x1=1.1d0
|
||||
y1 = erfc(x1)
|
||||
if (abs(y1 - .1197949d0) .ge. 1.d-6) call exit(1)
|
||||
if (abs(y1 - .1197949d0) .ge. 1.d-6) call abort
|
||||
|
||||
x1=10
|
||||
y1 = erfc(x1)
|
||||
if (y1 .gt. 1.5d-44) call exit(1)
|
||||
if (y1 .gt. 1.5d-44) call abort
|
||||
end
|
||||
c=================================================
|
||||
!output:
|
||||
|
@ -1,3 +1,3 @@
|
||||
a = 2**-2*1.
|
||||
if (a .ne. .25) call exit(1)
|
||||
if (a .ne. .25) call abort
|
||||
end
|
||||
|
@ -8,22 +8,22 @@
|
||||
n = 5
|
||||
|
||||
t = (n > foo)
|
||||
if (t .neqv. .true.) call exit(1)
|
||||
if (t .neqv. .true.) call abort
|
||||
t = (n >= foo)
|
||||
if (t .neqv. .true.) call exit(1)
|
||||
if (t .neqv. .true.) call abort
|
||||
t = (n < foo)
|
||||
if (t .neqv. .false.) call exit(1)
|
||||
if (t .neqv. .false.) call abort
|
||||
t = (n <= 5)
|
||||
if (t .neqv. .true.) call exit(1)
|
||||
if (t .neqv. .true.) call abort
|
||||
t = (n >= 5 )
|
||||
if (t .neqv. .true.) call exit(1)
|
||||
if (t .neqv. .true.) call abort
|
||||
t = (n == 5)
|
||||
if (t .neqv. .true.) call exit(1)
|
||||
if (t .neqv. .true.) call abort
|
||||
t = (n /= 5)
|
||||
if (t .neqv. .false.) call exit(1)
|
||||
if (t .neqv. .false.) call abort
|
||||
t = (n /= foo)
|
||||
if (t .neqv. .true.) call exit(1)
|
||||
if (t .neqv. .true.) call abort
|
||||
t = (n == foo)
|
||||
if (t .neqv. .false.) call exit(1)
|
||||
if (t .neqv. .false.) call abort
|
||||
|
||||
end
|
||||
|
@ -46,11 +46,11 @@ c another four-way average of rhobar
|
||||
270 continue
|
||||
|
||||
do k=0,N
|
||||
if (yzin1(k) .ne. yzin2(k)) call exit(1)
|
||||
if (yzin1(k) .ne. yzin2(k)) call abort
|
||||
enddo
|
||||
if (yzin1(0) .ne. -1371.) call exit(1)
|
||||
if (yzin1(1) .ne. -685.5) call exit(1)
|
||||
if (yzin1(2) .ne. 0.) call exit(1)
|
||||
if (yzin1(0) .ne. -1371.) call abort
|
||||
if (yzin1(1) .ne. -685.5) call abort
|
||||
if (yzin1(2) .ne. 0.) call abort
|
||||
|
||||
return
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user