1 ! RUN: %python %S/test_errors.py %s %flang_fc1
4 attributes(device) subroutine exts1
8 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
9 recursive attributes(device) subroutine s1
11 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
12 pure attributes(device) subroutine s2
14 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
15 elemental attributes(device) subroutine s3
19 !ERROR: A device subprogram may not be an internal subprogram
20 attributes(device) subroutine inner
23 attributes(device) subroutine s5 ! nvfortran crashes on this one
25 !ERROR: 'inner' may not be an internal procedure of CUDA device subprogram 's5'
29 attributes(device) subroutine s6
30 stmtfunc(x) = x + 1. ! ok
32 !ERROR: A function may not have ATTRIBUTES(GLOBAL) or ATTRIBUTES(GRID_GLOBAL)
33 attributes(global) real function f1
35 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
36 recursive attributes(global) subroutine s7
38 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
39 pure attributes(global) subroutine s8
41 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
42 elemental attributes(global) subroutine s9
46 attributes(device) subroutine exts1