[Flang][RISCV] Set vscale_range based off zvl*b (#77277)
[llvm-project.git] / flang / test / Semantics / cuf02.cuf
blob881a3005e2817bda7e48eefa2946245a5a378313
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m
3   interface
4     attributes(device) subroutine exts1
5     end
6   end interface
7  contains
8   !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
9   recursive attributes(device) subroutine s1
10   end
11   !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
12   pure attributes(device) subroutine s2
13   end
14   !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
15   elemental attributes(device) subroutine s3
16   end
17   subroutine s4
18    contains
19     !ERROR: A device subprogram may not be an internal subprogram
20     attributes(device) subroutine inner
21     end
22   end
23   attributes(device) subroutine s5 ! nvfortran crashes on this one
24    contains
25     !ERROR: 'inner' may not be an internal procedure of CUDA device subprogram 's5'
26     subroutine inner
27     end
28   end
29   attributes(device) subroutine s6
30     stmtfunc(x) = x + 1. ! ok
31   end
32   !ERROR: A function may not have ATTRIBUTES(GLOBAL) or ATTRIBUTES(GRID_GLOBAL)
33   attributes(global) real function f1
34   end
35   !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
36   recursive attributes(global) subroutine s7
37   end
38   !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
39   pure attributes(global) subroutine s8
40   end
41   !ERROR: A device subprogram may not be RECURSIVE, PURE, or ELEMENTAL
42   elemental attributes(global) subroutine s9
43   end
44 end
46 attributes(device) subroutine exts1
47 end