summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/class_optional_1.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/class_optional_1.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/class_optional_1.f9090
1 files changed, 45 insertions, 45 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_optional_1.f90 b/gcc/testsuite/gfortran.dg/class_optional_1.f90
index 2b408dbda05..86c1f9ebc76 100644
--- a/gcc/testsuite/gfortran.dg/class_optional_1.f90
+++ b/gcc/testsuite/gfortran.dg/class_optional_1.f90
@@ -21,73 +21,73 @@
call suba(alloc=.false., prsnt=.false.)
call suba(xa, alloc=.false., prsnt=.true.)
- if (.not. allocated (xa)) call abort ()
- if (.not. allocated (xa%i)) call abort ()
- if (xa%i /= 5) call abort ()
+ if (.not. allocated (xa)) STOP 1
+ if (.not. allocated (xa%i)) STOP 2
+ if (xa%i /= 5) STOP 3
xa%i = -3
call suba(xa, alloc=.true., prsnt=.true.)
- if (allocated (xa)) call abort ()
+ if (allocated (xa)) STOP 4
call suba2(alloc=.false., prsnt=.false.)
call suba2(xa2, alloc=.false., prsnt=.true.)
- if (.not. allocated (xa2)) call abort ()
- if (size (xa2) /= 1) call abort ()
- if (.not. allocated (xa2(1)%i)) call abort ()
- if (xa2(1)%i /= 5) call abort ()
+ if (.not. allocated (xa2)) STOP 5
+ if (size (xa2) /= 1) STOP 6
+ if (.not. allocated (xa2(1)%i)) STOP 7
+ if (xa2(1)%i /= 5) STOP 8
xa2(1)%i = -3
call suba2(xa2, alloc=.true., prsnt=.true.)
- if (allocated (xa2)) call abort ()
+ if (allocated (xa2)) STOP 9
call subp(alloc=.false., prsnt=.false.)
call subp(xp, alloc=.false., prsnt=.true.)
- if (.not. associated (xp)) call abort ()
- if (.not. allocated (xp%i)) call abort ()
- if (xp%i /= 5) call abort ()
+ if (.not. associated (xp)) STOP 10
+ if (.not. allocated (xp%i)) STOP 11
+ if (xp%i /= 5) STOP 12
xp%i = -3
call subp(xp, alloc=.true., prsnt=.true.)
- if (associated (xp)) call abort ()
+ if (associated (xp)) STOP 13
call subp2(alloc=.false., prsnt=.false.)
call subp2(xp2, alloc=.false., prsnt=.true.)
- if (.not. associated (xp2)) call abort ()
- if (size (xp2) /= 1) call abort ()
- if (.not. allocated (xp2(1)%i)) call abort ()
- if (xp2(1)%i /= 5) call abort ()
+ if (.not. associated (xp2)) STOP 14
+ if (size (xp2) /= 1) STOP 15
+ if (.not. allocated (xp2(1)%i)) STOP 16
+ if (xp2(1)%i /= 5) STOP 17
xp2(1)%i = -3
call subp2(xp2, alloc=.true., prsnt=.true.)
- if (associated (xp2)) call abort ()
+ if (associated (xp2)) STOP 18
call subac(alloc=.false., prsnt=.false.)
call subac(xac, alloc=.false., prsnt=.true.)
- if (.not. allocated (xac)) call abort ()
- if (.not. allocated (xac%i)) call abort ()
- if (xac%i /= 5) call abort ()
+ if (.not. allocated (xac)) STOP 19
+ if (.not. allocated (xac%i)) STOP 20
+ if (xac%i /= 5) STOP 21
xac%i = -3
call subac(xac, alloc=.true., prsnt=.true.)
- if (allocated (xac)) call abort ()
+ if (allocated (xac)) STOP 22
call suba2c(alloc=.false., prsnt=.false.)
call suba2c(xa2c, alloc=.false., prsnt=.true.)
- if (.not. allocated (xa2c)) call abort ()
- if (size (xa2c) /= 1) call abort ()
- if (.not. allocated (xa2c(1)%i)) call abort ()
- if (xa2c(1)%i /= 5) call abort ()
+ if (.not. allocated (xa2c)) STOP 23
+ if (size (xa2c) /= 1) STOP 24
+ if (.not. allocated (xa2c(1)%i)) STOP 25
+ if (xa2c(1)%i /= 5) STOP 26
xa2c(1)%i = -3
call suba2c(xa2c, alloc=.true., prsnt=.true.)
- if (allocated (xa2c)) call abort ()
+ if (allocated (xa2c)) STOP 27
contains
subroutine suba2c(x, prsnt, alloc)
class(t), optional, allocatable :: x(:)[:]
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 28
if (prsnt) then
- if (alloc .neqv. allocated(x)) call abort ()
+ if (alloc .neqv. allocated(x)) STOP 29
if (.not. allocated (x)) then
allocate (x(1)[*])
x(1)%i = 5
else
- if (x(1)%i /= -3) call abort()
+ if (x(1)%i /= -3) STOP 30
deallocate (x)
end if
end if
@@ -96,14 +96,14 @@ contains
subroutine subac(x, prsnt, alloc)
class(t), optional, allocatable :: x[:]
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 31
if (present (x)) then
- if (alloc .neqv. allocated(x)) call abort ()
+ if (alloc .neqv. allocated(x)) STOP 32
if (.not. allocated (x)) then
allocate (x[*])
x%i = 5
else
- if (x%i /= -3) call abort()
+ if (x%i /= -3) STOP 33
deallocate (x)
end if
end if
@@ -112,14 +112,14 @@ contains
subroutine suba2(x, prsnt, alloc)
class(t), optional, allocatable :: x(:)
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 34
if (prsnt) then
- if (alloc .neqv. allocated(x)) call abort ()
+ if (alloc .neqv. allocated(x)) STOP 35
if (.not. allocated (x)) then
allocate (x(1))
x(1)%i = 5
else
- if (x(1)%i /= -3) call abort()
+ if (x(1)%i /= -3) STOP 36
deallocate (x)
end if
end if
@@ -128,14 +128,14 @@ contains
subroutine suba(x, prsnt, alloc)
class(t), optional, allocatable :: x
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 37
if (present (x)) then
- if (alloc .neqv. allocated(x)) call abort ()
+ if (alloc .neqv. allocated(x)) STOP 38
if (.not. allocated (x)) then
allocate (x)
x%i = 5
else
- if (x%i /= -3) call abort()
+ if (x%i /= -3) STOP 39
deallocate (x)
end if
end if
@@ -144,14 +144,14 @@ contains
subroutine subp2(x, prsnt, alloc)
class(t), optional, pointer :: x(:)
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 40
if (present (x)) then
- if (alloc .neqv. associated(x)) call abort ()
+ if (alloc .neqv. associated(x)) STOP 41
if (.not. associated (x)) then
allocate (x(1))
x(1)%i = 5
else
- if (x(1)%i /= -3) call abort()
+ if (x(1)%i /= -3) STOP 42
deallocate (x)
end if
end if
@@ -160,14 +160,14 @@ contains
subroutine subp(x, prsnt, alloc)
class(t), optional, pointer :: x
logical prsnt, alloc
- if (present (x) .neqv. prsnt) call abort ()
+ if (present (x) .neqv. prsnt) STOP 43
if (present (x)) then
- if (alloc .neqv. associated(x)) call abort ()
+ if (alloc .neqv. associated(x)) STOP 44
if (.not. associated (x)) then
allocate (x)
x%i = 5
else
- if (x%i /= -3) call abort()
+ if (x%i /= -3) STOP 45
deallocate (x)
end if
end if