1*1c91d9bdSPeter Klausler! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -pedantic 23323a4bdSKiran Chandramohan! OpenMP Version 5.1 33323a4bdSKiran Chandramohan! Check OpenMP construct validity for the following directives: 43323a4bdSKiran Chandramohan! 2.14.7 Declare Target Directive 53323a4bdSKiran Chandramohan 63323a4bdSKiran Chandramohanmodule mod1 73323a4bdSKiran Chandramohanend 83323a4bdSKiran Chandramohan 93323a4bdSKiran Chandramohansubroutine bar 103323a4bdSKiran Chandramohan !$omp declare target (bar) 113323a4bdSKiran Chandramohanend subroutine 123323a4bdSKiran Chandramohan 133323a4bdSKiran Chandramohanprogram main 143323a4bdSKiran Chandramohan use mod1 153323a4bdSKiran Chandramohan 163323a4bdSKiran Chandramohan !ERROR: The module name or main program name cannot be in a DECLARE TARGET directive 173323a4bdSKiran Chandramohan !$omp declare target (mod1) 183323a4bdSKiran Chandramohan 193323a4bdSKiran Chandramohan !PORTABILITY: Name 'main' declared in a main program should not have the same name as the main program 203323a4bdSKiran Chandramohan !ERROR: The module name or main program name cannot be in a DECLARE TARGET directive 213323a4bdSKiran Chandramohan !$omp declare target (main) 223323a4bdSKiran Chandramohanend 23