| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f2018" } |
| 3 |
|
| 4 |
implicit none |
| 5 |
logical :: q = .false. |
| 6 |
integer(2) :: p = 99 |
| 7 |
real :: x = 0. |
| 8 |
character(5) :: s = "stopp" |
| 9 |
print *, "Hello" |
| 10 |
stop 1, quiet=.false. |
| 11 |
stop 2, quiet=q |
| 12 |
stop 3, quiet=f(x) |
| 13 |
stop; stop! |
| 14 |
stop ;stop 4! |
| 15 |
stop 5; stop 6 |
| 16 |
stop 7 ;stop 8 |
| 17 |
stop 1_1; stop 2_2; stop 4_4; stop 8_8 |
| 18 |
stop&! |
| 19 |
&;stop;&! |
| 20 |
stop&! |
| 21 |
s& |
| 22 |
; stop "x";&! |
| 23 |
; st&! |
| 24 |
&op&! |
| 25 |
p |
| 26 |
stop s |
| 27 |
if(f(x))then;stop 9,quiet=.false.;else;stop 10;endif |
| 28 |
error stop 4, quiet=.true. |
| 29 |
error stop 5 , quiet=.true. |
| 30 |
error stop s, quiet=.true. |
| 31 |
stop "last " // s, quiet=.false._2 |
| 32 |
stop, quiet=any([.false.]) |
| 33 |
stop , quiet=any([f(x)]) |
| 34 |
stop "stopp" , quiet=any([f(x)]) |
| 35 |
stop s, quiet=all([f(x)]) |
| 36 |
stop42, quiet=.false. ! { dg-error "Blank required" } |
| 37 |
stop"stopp" , quiet=any([f(x)]) ! { dg-error "Blank required" } |
| 38 |
stop 8, quiet=([f(x)]) ! { dg-error "must be a scalar LOGICAL" } |
| 39 |
contains |
| 40 |
logical function f(x) |
| 41 |
real, intent(in) :: x |
| 42 |
f = .false. |
| 43 |
end function f |
| 44 |
end |