1 ! RUN: %python %S/test_errors.py %s %flang_fc1
4 !ERROR: An ATTRIBUTES(DEVICE) subprogram must be a top-level module procedure
5 attributes(device) subroutine exts1
9 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
10 recursive attributes(device) subroutine s1
12 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
13 pure attributes(device) subroutine s2
15 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
16 elemental attributes(device) subroutine s3
20 !ERROR: A device subprogram may not be an internal subprogram
21 attributes(device) subroutine inner
24 attributes(device) subroutine s5 ! nvfortran crashes on this one
26 !ERROR: 'inner' may not be an internal procedure of CUDA device subprogram 's5'
30 attributes(device) subroutine s6
31 stmtfunc(x) = x + 1. ! ok
33 !ERROR: A function may not have ATTRIBUTES(GLOBAL) or ATTRIBUTES(GRID_GLOBAL)
34 attributes(global) real function f1
36 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
37 recursive attributes(global) subroutine s7
39 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
40 pure attributes(global) subroutine s8
42 !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
43 elemental attributes(global) subroutine s9
47 !ERROR: An ATTRIBUTES(DEVICE) subprogram must be a top-level module procedure
48 attributes(device) subroutine exts1