error_stop-2.f 874 B

1234567891011121314151617181920212223242526272829
  1. ! { dg-do run }
  2. PROGRAM MAIN
  3. IMPLICIT NONE
  4. ! Initialize before the checkpoint, in case this produces any output.
  5. !$ACC PARALLEL
  6. !$ACC END PARALLEL
  7. PRINT *, "CheCKpOInT"
  8. !$ACC PARALLEL
  9. ERROR STOP 35
  10. !$ACC END PARALLEL
  11. PRINT *, "WrONg WAy"
  12. END PROGRAM MAIN
  13. ! { dg-output "CheCKpOInT(\n|\r\n|\r)+" }
  14. ! { dg-output "ERROR STOP 35(\n|\r\n|\r)+" }
  15. !
  16. ! In gfortran's main program, libfortran's set_options is called - which sets
  17. ! compiler_options.backtrace = 1 by default. For an offload libgfortran, this
  18. ! is never called and, hence, "Error termination." is never printed. Thus:
  19. ! { dg-output "Error termination.*" { target { ! { openacc_nvidia_accel_selected || openacc_radeon_accel_selected } } } }
  20. !
  21. ! PR85463:
  22. ! { dg-output "libgomp: cuStreamSynchronize error.*" { target openacc_nvidia_accel_selected } }
  23. !
  24. ! { dg-shouldfail "" }