54 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12module m3 interface4 attributes(device) subroutine exts15 end6 end interface7 contains8 recursive attributes(device) subroutine s1 ! ok9 end10 pure attributes(device) subroutine s2 ! ok11 end12 elemental attributes(device) subroutine s3 ! ok13 end14 subroutine s415 contains16 !ERROR: A device subprogram may not be an internal subprogram17 attributes(device) subroutine inner18 end19 end20 attributes(device) subroutine s5 ! nvfortran crashes on this one21 contains22 !ERROR: 'inner' may not be an internal procedure of CUDA device subprogram 's5'23 subroutine inner24 end25 end26 attributes(device) subroutine s627 stmtfunc(x) = x + 1. ! ok28 end29 !ERROR: A function may not have ATTRIBUTES(GLOBAL) or ATTRIBUTES(GRID_GLOBAL)30 attributes(global) real function f131 end32 !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL33 recursive attributes(global) subroutine s734 end35 !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL36 pure attributes(global) subroutine s837 end38 !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL39 elemental attributes(global) subroutine s940 end41 !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL42 recursive attributes(grid_global) subroutine s1043 end44 !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL45 pure attributes(grid_global) subroutine s1146 end47 !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL48 elemental attributes(grid_global) subroutine s1249 end50end51 52attributes(device) subroutine exts153end54