[PR rtl-optimization/115877][6/n] Add testcase from pr115877
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / error_stop-3.f
blob15e02d8b744b6b4754788ed7a88907d39ab06699
1 ! { dg-do run }
3 PROGRAM MAIN
4 IMPLICIT NONE
6 ! Initialize before the checkpoint, in case this produces any output.
7 !$ACC PARALLEL
8 !$ACC END PARALLEL
10 PRINT *, "CheCKpOInT"
11 !$ACC PARALLEL
12 ERROR STOP "SiGN"
13 !$ACC END PARALLEL
14 PRINT *, "WrONg WAy"
16 END PROGRAM MAIN
18 ! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
20 ! { dg-output "ERROR STOP SiGN(\n|\r\n|\r)+" }
22 ! In gfortran's main program, libfortran's set_options is called - which sets
23 ! compiler_options.backtrace = 1 by default. For an offload libgfortran, this
24 ! is never called and, hence, "Error termination." is never printed. Thus:
25 ! { dg-output "Error termination.*" { target { ! { openacc_nvidia_accel_selected || openacc_radeon_accel_selected } } } }
27 ! PR85463. The 'exit' implementation used with nvptx
28 ! offloading is a little bit different.
29 ! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
31 ! { dg-shouldfail "" }