13332dc32SPeter Klausler! RUN: %python %S/test_errors.py %s %flang_fc1 23332dc32SPeter Klauslermodule m 33332dc32SPeter Klausler interface 43332dc32SPeter Klausler attributes(device) subroutine exts1 53332dc32SPeter Klausler end 63332dc32SPeter Klausler end interface 73332dc32SPeter Klausler contains 849cb6dbcSValentin Clement (バレンタイン クレメン) recursive attributes(device) subroutine s1 ! ok 93332dc32SPeter Klausler end 1049cb6dbcSValentin Clement (バレンタイン クレメン) pure attributes(device) subroutine s2 ! ok 113332dc32SPeter Klausler end 1249cb6dbcSValentin Clement (バレンタイン クレメン) elemental attributes(device) subroutine s3 ! ok 133332dc32SPeter Klausler end 143332dc32SPeter Klausler subroutine s4 153332dc32SPeter Klausler contains 163332dc32SPeter Klausler !ERROR: A device subprogram may not be an internal subprogram 173332dc32SPeter Klausler attributes(device) subroutine inner 183332dc32SPeter Klausler end 193332dc32SPeter Klausler end 203332dc32SPeter Klausler attributes(device) subroutine s5 ! nvfortran crashes on this one 213332dc32SPeter Klausler contains 223332dc32SPeter Klausler !ERROR: 'inner' may not be an internal procedure of CUDA device subprogram 's5' 233332dc32SPeter Klausler subroutine inner 243332dc32SPeter Klausler end 253332dc32SPeter Klausler end 263332dc32SPeter Klausler attributes(device) subroutine s6 273332dc32SPeter Klausler stmtfunc(x) = x + 1. ! ok 283332dc32SPeter Klausler end 293332dc32SPeter Klausler !ERROR: A function may not have ATTRIBUTES(GLOBAL) or ATTRIBUTES(GRID_GLOBAL) 303332dc32SPeter Klausler attributes(global) real function f1 313332dc32SPeter Klausler end 32*7c555cb2SValentin Clement (バレンタイン クレメン) !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL 33*7c555cb2SValentin Clement (バレンタイン クレメン) recursive attributes(global) subroutine s7 343332dc32SPeter Klausler end 35*7c555cb2SValentin Clement (バレンタイン クレメン) !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL 36*7c555cb2SValentin Clement (バレンタイン クレメン) pure attributes(global) subroutine s8 373332dc32SPeter Klausler end 38*7c555cb2SValentin Clement (バレンタイン クレメン) !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL 39*7c555cb2SValentin Clement (バレンタイン クレメン) elemental attributes(global) subroutine s9 40*7c555cb2SValentin Clement (バレンタイン クレメン) end 41*7c555cb2SValentin Clement (バレンタイン クレメン) !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL 42*7c555cb2SValentin Clement (バレンタイン クレメン) recursive attributes(grid_global) subroutine s10 43*7c555cb2SValentin Clement (バレンタイン クレメン) end 44*7c555cb2SValentin Clement (バレンタイン クレメン) !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL 45*7c555cb2SValentin Clement (バレンタイン クレメン) pure attributes(grid_global) subroutine s11 46*7c555cb2SValentin Clement (バレンタイン クレメン) end 47*7c555cb2SValentin Clement (バレンタイン クレメン) !ERROR: A kernel subprogram may not be RECURSIVE, PURE, or ELEMENTAL 48*7c555cb2SValentin Clement (バレンタイン クレメン) elemental attributes(grid_global) subroutine s12 493332dc32SPeter Klausler end 503332dc32SPeter Klauslerend 513332dc32SPeter Klausler 523332dc32SPeter Klauslerattributes(device) subroutine exts1 533332dc32SPeter Klauslerend 54