#endif
-#if __nvptx__
-/* Map "exit" to "abort"; see PR85463 '[nvptx] "exit" in offloaded region
- doesn't terminate process'. */
-# undef exit
-# define exit(status) do { (void) (status); abort (); } while (0)
-#endif
-
-
#if __nvptx__
/* 'printf' is all we have. */
# undef estr_vprintf
#endif
-/* The 'exit (EXIT_FAILURE);' of an Fortran (only, huh?) OpenMP 'error'
- directive with 'severity (fatal)' causes a hang, so 'abort' instead of
- 'exit'. */
-#undef exit
-#define exit(status) abort ()
-
-
#include "../../error.c"
END PROGRAM MAIN
! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
+
! { dg-output "ERROR STOP (\n|\r\n|\r)+" }
!
! In gfortran's main program, libfortran's set_options is called - which sets
! compiler_options.backtrace = 1 by default. For an offload libgfortran, this
! is never called and, hence, "Error termination." is never printed. Thus:
! { dg-output "Error termination.*" { target { ! { openacc_nvidia_accel_selected || openacc_radeon_accel_selected } } } }
-!
-! PR85463:
+
+! PR85463. The 'exit' implementation used with nvptx
+! offloading is a little bit different.
! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
-!
+
! { dg-shouldfail "" }
END PROGRAM MAIN
! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
+
! { dg-output "ERROR STOP 35(\n|\r\n|\r)+" }
!
! In gfortran's main program, libfortran's set_options is called - which sets
! compiler_options.backtrace = 1 by default. For an offload libgfortran, this
! is never called and, hence, "Error termination." is never printed. Thus:
! { dg-output "Error termination.*" { target { ! { openacc_nvidia_accel_selected || openacc_radeon_accel_selected } } } }
-!
-! PR85463:
+
+! PR85463. The 'exit' implementation used with nvptx
+! offloading is a little bit different.
! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
-!
+
! { dg-shouldfail "" }
END PROGRAM MAIN
! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
+
! { dg-output "ERROR STOP SiGN(\n|\r\n|\r)+" }
!
! In gfortran's main program, libfortran's set_options is called - which sets
! compiler_options.backtrace = 1 by default. For an offload libgfortran, this
! is never called and, hence, "Error termination." is never printed. Thus:
! { dg-output "Error termination.*" { target { ! { openacc_nvidia_accel_selected || openacc_radeon_accel_selected } } } }
-!
-! PR85463:
+
+! PR85463. The 'exit' implementation used with nvptx
+! offloading is a little bit different.
! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
-!
+
! { dg-shouldfail "" }
END PROGRAM MAIN
! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
-! PR85463. The "minimal" libgfortran implementation used with nvptx
+
+! { dg-output "" }
+!
+! PR85463. The 'exit' implementation used with nvptx
! offloading is a little bit different.
! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
+
! { dg-output "$" }
+
! PR85463. STOP with code zero (as implied here) should actually
-! terminate the process normally, but doesn't in the "minimal"
-! libgfortran implementation used with nvptx offloading.
-! { dg-shouldfail "" { openacc_nvidia_accel_selected } }
+! terminate the process normally, but doesn't with the 'exit'
+! implementation used with nvptx offloading.
+! { dg-shouldfail PR85463 { openacc_nvidia_accel_selected } }
END PROGRAM MAIN
! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
+
! { dg-output "STOP 35(\n|\r\n|\r)+" }
-! PR85463. The "minimal" libgfortran implementation used with nvptx
+!
+! PR85463. The 'exit' implementation used with nvptx
! offloading is a little bit different.
! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
+
! { dg-output "$" }
+
! { dg-shouldfail "" }
END PROGRAM MAIN
! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
+
! { dg-output "STOP SiGN(\n|\r\n|\r)+" }
-! PR85463. The "minimal" libgfortran implementation used with nvptx
+!
+! PR85463. The 'exit' implementation used with nvptx
! offloading is a little bit different.
! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
+
! { dg-output "$" }
+
! PR85463. STOP with code zero (as implied here) should actually
-! terminate the process normally, but doesn't in the "minimal"
-! libgfortran implementation used with nvptx offloading.
-! { dg-shouldfail "" { openacc_nvidia_accel_selected } }
+! terminate the process normally, but doesn't with the 'exit'
+! implementation used with nvptx offloading.
+! { dg-shouldfail PR85463 { openacc_nvidia_accel_selected } }