brintos

brintos / llvm-project-archived public Read only

0
0
Text · 44.3 KiB · 0281d14 Raw
775 lines · cpp
1// RUN: %clang_cc1 %s -fopenacc -verify2 3void Func();4void Func2();5 6#pragma acc routine(Func) worker7#pragma acc routine(Func) vector nohost8#pragma acc routine(Func) nohost seq9#pragma acc routine(Func) gang10// expected-error@+2{{OpenACC clause 'bind' may not appear on the same construct as a 'bind' clause on a 'routine' construct}}11// expected-note@+1{{previous 'bind' clause is here}}12#pragma acc routine(Func) gang bind(a) bind(a)13 14// expected-error@+2{{OpenACC clause 'bind' may not appear on the same construct as a 'bind' clause on a 'routine' construct}}15// expected-note@+1{{previous 'bind' clause is here}}16#pragma acc routine gang bind(a) bind(a)17void DupeImplName();18 19// Only 1 of worker, vector, seq, gang.20// expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}21// expected-note@+1{{previous 'worker' clause is here}}22#pragma acc routine(Func) worker vector23// expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}24// expected-note@+1{{previous 'worker' clause is here}}25#pragma acc routine(Func) worker seq26// expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}27// expected-note@+1{{previous 'worker' clause is here}}28#pragma acc routine(Func) worker gang29// expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}30// expected-note@+1{{previous 'worker' clause is here}}31#pragma acc routine(Func) worker worker32// expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}33// expected-note@+1{{previous 'vector' clause is here}}34#pragma acc routine(Func) vector worker35// expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}36// expected-note@+1{{previous 'vector' clause is here}}37#pragma acc routine(Func) vector seq38// expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}39// expected-note@+1{{previous 'vector' clause is here}}40#pragma acc routine(Func) vector gang41// expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}42// expected-note@+1{{previous 'vector' clause is here}}43#pragma acc routine(Func) vector vector44// expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}45// expected-note@+1{{previous 'seq' clause is here}}46#pragma acc routine(Func) seq worker47// expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}48// expected-note@+1{{previous 'seq' clause is here}}49#pragma acc routine(Func) seq vector50// expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}51// expected-note@+1{{previous 'seq' clause is here}}52#pragma acc routine(Func) seq gang53// expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}54// expected-note@+1{{previous 'seq' clause is here}}55#pragma acc routine(Func) seq seq56// expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}57// expected-note@+1{{previous 'gang' clause is here}}58#pragma acc routine(Func) gang worker59// expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}60// expected-note@+1{{previous 'gang' clause is here}}61#pragma acc routine(Func) gang vector62// expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}63// expected-note@+1{{previous 'gang' clause is here}}64#pragma acc routine(Func) gang seq65// expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}66// expected-note@+1{{previous 'gang' clause is here}}67#pragma acc routine(Func) gang gang68// expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause}}69#pragma acc routine(Func)70// expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause}}71#pragma acc routine(Func) nohost72 73// only the 'dim' syntax for gang is legal.74#pragma acc routine(Func) gang(dim:1)75// expected-error@+1{{'num' argument on 'gang' clause is not permitted on a 'routine' construct}}76#pragma acc routine(Func) gang(1)77// expected-error@+1{{'num' argument on 'gang' clause is not permitted on a 'routine' construct}}78#pragma acc routine(Func) gang(num:1)79// expected-error@+1{{'static' argument on 'gang' clause is not permitted on a 'routine' construct}}80#pragma acc routine(Func) gang(static:1)81// expected-error@+2{{OpenACC 'gang' clause may have at most one 'dim' argument}}82// expected-note@+1{{previous expression is here}}83#pragma acc routine(Func) gang(dim:1, dim:2)84 85// worker, vector, seq don't allow arguments.86// expected-error@+1{{'num' argument on 'worker' clause is not permitted on a 'routine' construct}}87#pragma acc routine(Func) worker(1)88// expected-error@+1{{'length' argument on 'vector' clause is not permitted on a 'routine' construct}}89#pragma acc routine(Func) vector(1)90// expected-error@+1{{expected identifier}}91#pragma acc routine(Func) seq(1)92 93int getSomeInt();94// dim must be a constant positive integer.95// expected-error@+1{{argument to 'gang' clause dimension must be a constant expression}}96#pragma acc routine(Func) gang(dim:getSomeInt())97 98struct HasFuncs {99static constexpr int Neg() { return -5; }100static constexpr int Zero() { return 0; }101static constexpr int One() { return 1; }102static constexpr int Two() { return 2; }103static constexpr int Three() { return 3; }104static constexpr int Four() { return 4; }105};106// 'dim' must be 1, 2, or 3.107// expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to -5}}108#pragma acc routine(Func) gang(dim:HasFuncs::Neg())109// expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 0}}110#pragma acc routine(Func) gang(dim:HasFuncs::Zero())111#pragma acc routine(Func) gang(dim:HasFuncs::One())112#pragma acc routine(Func) gang(dim:HasFuncs::Two())113#pragma acc routine(Func) gang(dim:HasFuncs::Three())114// expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 4}}115#pragma acc routine(Func) gang(dim:HasFuncs::Four())116 117template<typename T>118struct DependentT {119// expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to -5}}120#pragma acc routine(Func) gang(dim:T::Neg())121// expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 0}}122#pragma acc routine(Func) gang(dim:T::Zero()) nohost123#pragma acc routine(Func) nohost gang(dim:T::One())124#pragma acc routine(Func) gang(dim:T::Two())125#pragma acc routine(Func) gang(dim:T::Three())126// expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 4}}127#pragma acc routine(Func) gang(dim:T::Four())128 129  void MemFunc();130// expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 4}}131#pragma acc routine(MemFunc) gang(dim:T::Four())132 133// expected-error@+1{{argument to 'gang' clause dimension must be 1, 2, or 3: evaluated to 4}}134#pragma acc routine gang(dim:T::Four())135  void MemFunc2();136};137 138void Inst() {139  DependentT<HasFuncs> T;// expected-note{{in instantiation of}}140}141 142#pragma acc routine(Func) gang device_type(host)143#pragma acc routine(Func) gang dtype(multicore)144#pragma acc routine(Func) device_type(*) worker145#pragma acc routine(Func) dtype(*) worker146 147#pragma acc routine(Func) dtype(*) gang148#pragma acc routine(Func) device_type(*) worker149#pragma acc routine(Func) device_type(*) vector150#pragma acc routine(Func) dtype(*) seq151#pragma acc routine(Func2) seq device_type(*) bind("asdf")152void Func6();153#pragma acc routine(Func6) seq device_type(*) bind(WhateverElse)154#pragma acc routine(Func) seq dtype(*) device_type(*)155// expected-error@+2{{OpenACC clause 'nohost' may not follow a 'dtype' clause in a 'routine' construct}}156// expected-note@+1{{active 'dtype' clause here}}157#pragma acc routine(Func) seq dtype(*) nohost158// expected-error@+2{{OpenACC clause 'nohost' may not follow a 'device_type' clause in a 'routine' construct}}159// expected-note@+1{{active 'device_type' clause here}}160#pragma acc routine(Func) seq device_type(*) nohost161 162// 2.15: a bind clause may not bind to a routine name that has a visible bind clause.163void Func3();164#pragma acc routine(Func3) seq bind("asdf")165// OK: Doesn't have a bind166#pragma acc routine(Func3) seq167// expected-error@+2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}168// expected-note@-4{{previous 'bind' clause is here}}169#pragma acc routine(Func3) seq bind("asdf")170 171void Func4();172// OK: Doesn't have a bind173#pragma acc routine(Func4) seq174#pragma acc routine(Func4) seq bind("asdf")175// expected-error@+2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}176// expected-note@-2{{previous 'bind' clause is here}}177#pragma acc routine(Func4) seq bind("asdf")178void Func5();179#pragma acc routine(Func5) seq bind("asdf")180// expected-error@+2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}181// expected-note@-2{{previous 'bind' clause is here}}182#pragma acc routine(Func5) seq bind("asdf")183// OK: Doesn't have a bind184#pragma acc routine(Func5) seq185 186// OK, same.187#pragma acc routine bind("asdf") seq188void DupeBinds1();189#pragma acc routine bind("asdf") seq190void DupeBinds1();191 192#pragma acc routine bind(asdf) seq193void DupeBinds2();194#pragma acc routine bind(asdf) seq195void DupeBinds2();196 197#pragma acc routine bind("asdf") seq198void DupeBinds3();199// expected-error@+2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}200// expected-note@-3{{previous 'bind' clause is here}}201#pragma acc routine bind(asdf) seq202void DupeBinds3();203 204void DupeBinds4();205#pragma acc routine(DupeBinds4) bind(asdf) seq206// expected-error@+2{{multiple 'routine' directives with 'bind' clauses are not permitted to refer to the same function}}207// expected-note@-2{{previous 'bind' clause is here}}208#pragma acc routine bind(asdf) seq209void DupeBinds4();210 211void DupeBinds4b();212// expected-error@+1{{expected function or lambda declaration for 'routine' construct}}213#pragma acc routine bind(asdf) seq214#pragma acc routine(DupeBinds4b) bind(asdf) seq215void DupeBinds4b();216 217#pragma acc routine bind(asdf) seq218void DupeBinds5();219// expected-error@+2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}220// expected-note@-3{{previous 'bind' clause is here}}221#pragma acc routine bind(asdfDiff) seq222void DupeBinds5();223 224#pragma acc routine bind("asdf") seq225void DupeBinds6();226// expected-error@+2{{OpenACC 'bind' clause on a declaration must bind to the same name as previous 'bind' clauses}}227// expected-note@-3{{previous 'bind' clause is here}}228#pragma acc routine bind("asdfDiff") seq229void DupeBinds6();230 231// The standard wasn't initially clear, but is being clarified that we require232// exactly one of (gang, worker, vector, or seq) to apply to each 'device_type'.233// The ones before any 'device_type' apply to all.234namespace FigureDupesAllowedAroundDeviceType {235  // Test conflicts without a device type236  // expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}237  // expected-note@+1{{previous 'gang' clause is here}}238#pragma acc routine gang gang239  void Func1();240  // expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}241  // expected-note@+1{{previous 'gang' clause is here}}242#pragma acc routine gang worker243  void Func2();244  // expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}245  // expected-note@+1{{previous 'gang' clause is here}}246#pragma acc routine gang vector247  void Func3();248  // expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}249  // expected-note@+1{{previous 'gang' clause is here}}250#pragma acc routine gang seq251  void Func4();252  // expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}253  // expected-note@+1{{previous 'worker' clause is here}}254#pragma acc routine worker gang255  void Func5();256  // expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}257  // expected-note@+1{{previous 'worker' clause is here}}258#pragma acc routine worker worker259  void Func6();260  // expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}261  // expected-note@+1{{previous 'worker' clause is here}}262#pragma acc routine worker vector263  void Func7();264  // expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}265  // expected-note@+1{{previous 'worker' clause is here}}266#pragma acc routine worker seq267  void Func8();268  // expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}269  // expected-note@+1{{previous 'vector' clause is here}}270#pragma acc routine vector gang271  void Func9();272  // expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}273  // expected-note@+1{{previous 'vector' clause is here}}274#pragma acc routine vector worker275  void Func10();276  // expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}277  // expected-note@+1{{previous 'vector' clause is here}}278#pragma acc routine vector vector279  void Func11();280  // expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}281  // expected-note@+1{{previous 'vector' clause is here}}282#pragma acc routine vector seq283  void Func12();284  // expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}285  // expected-note@+1{{previous 'seq' clause is here}}286#pragma acc routine seq gang287  void Func13();288  // expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}289  // expected-note@+1{{previous 'seq' clause is here}}290#pragma acc routine seq worker291  void Func14();292  // expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}293  // expected-note@+1{{previous 'seq' clause is here}}294#pragma acc routine seq vector295  void Func15();296  // expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}297  // expected-note@+1{{previous 'seq' clause is here}}298#pragma acc routine seq seq299  void Func16();300  // None included for one without a device type301  // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause}}302#pragma acc routine303  void Func16();304 305  // Check same conflicts for 'before' the device_type306  // expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}307  // expected-note@+1{{previous 'gang' clause is here}}308#pragma acc routine gang gang device_type(*)309  void Func17();310  // expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}311  // expected-note@+1{{previous 'gang' clause is here}}312#pragma acc routine gang worker device_type(*)313  void Func18();314  // expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}315  // expected-note@+1{{previous 'gang' clause is here}}316#pragma acc routine gang vector device_type(*)317  void Func19();318  // expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'gang' clause on a 'routine' construct}}319  // expected-note@+1{{previous 'gang' clause is here}}320#pragma acc routine gang seq device_type(*)321  void Func20();322  // expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}323  // expected-note@+1{{previous 'worker' clause is here}}324#pragma acc routine worker gang device_type(*)325  void Func21();326  // expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}327  // expected-note@+1{{previous 'worker' clause is here}}328#pragma acc routine worker worker device_type(*)329  void Func22();330  // expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}331  // expected-note@+1{{previous 'worker' clause is here}}332#pragma acc routine worker vector device_type(*)333  void Func23();334  // expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'worker' clause on a 'routine' construct}}335  // expected-note@+1{{previous 'worker' clause is here}}336#pragma acc routine worker seq device_type(*)337  void Func24();338  // expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}339  // expected-note@+1{{previous 'vector' clause is here}}340#pragma acc routine vector gang device_type(*)341  void Func25();342  // expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}343  // expected-note@+1{{previous 'vector' clause is here}}344#pragma acc routine vector worker device_type(*)345  void Func26();346  // expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}347  // expected-note@+1{{previous 'vector' clause is here}}348#pragma acc routine vector vector device_type(*)349  void Func27();350  // expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'vector' clause on a 'routine' construct}}351  // expected-note@+1{{previous 'vector' clause is here}}352#pragma acc routine vector seq device_type(*)353  void Func28();354  // expected-error@+2{{OpenACC clause 'gang' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}355  // expected-note@+1{{previous 'seq' clause is here}}356#pragma acc routine seq gang device_type(*)357  void Func29();358  // expected-error@+2{{OpenACC clause 'worker' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}359  // expected-note@+1{{previous 'seq' clause is here}}360#pragma acc routine seq worker device_type(*)361  void Func30();362  // expected-error@+2{{OpenACC clause 'vector' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}363  // expected-note@+1{{previous 'seq' clause is here}}364#pragma acc routine seq vector device_type(*)365  void Func31();366  // expected-error@+2{{OpenACC clause 'seq' may not appear on the same construct as a 'seq' clause on a 'routine' construct}}367  // expected-note@+1{{previous 'seq' clause is here}}368#pragma acc routine seq seq device_type(*)369  void Func32();370  // None included for the device_type371  // expected-error@+1{{OpenACC 'routine' construct must have at least one 'gang', 'seq', 'vector', or 'worker' clause that applies to each 'device_type'}}372#pragma acc routine device_type(*)373  void Func33();374 375  // Conflicts between 'global' and 'device_type'376  // expected-error@+3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' conflicts with the 'gang' clause before the first 'device_type'}}377  // expected-note@+2{{previous 'gang' clause is here}}378  // expected-note@+1{{active 'device_type' clause here}}379#pragma acc routine gang device_type(*) gang380  void Func34();381  // expected-error@+3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' conflicts with the 'gang' clause before the first 'device_type'}}382  // expected-note@+2{{previous 'gang' clause is here}}383  // expected-note@+1{{active 'device_type' clause here}}384#pragma acc routine gang device_type(*) worker385  void Func35();386  // expected-error@+3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' conflicts with the 'gang' clause before the first 'device_type'}}387  // expected-note@+2{{previous 'gang' clause is here}}388  // expected-note@+1{{active 'device_type' clause here}}389#pragma acc routine gang device_type(*) vector390  void Func36();391  // expected-error@+3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' conflicts with the 'gang' clause before the first 'device_type'}}392  // expected-note@+2{{previous 'gang' clause is here}}393  // expected-note@+1{{active 'device_type' clause here}}394#pragma acc routine gang device_type(*) seq395  void Func37();396  // expected-error@+3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' conflicts with the 'worker' clause before the first 'device_type'}}397  // expected-note@+2{{previous 'worker' clause is here}}398  // expected-note@+1{{active 'device_type' clause here}}399#pragma acc routine worker device_type(*) gang400  void Func38();401  // expected-error@+3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' conflicts with the 'worker' clause before the first 'device_type'}}402  // expected-note@+2{{previous 'worker' clause is here}}403  // expected-note@+1{{active 'device_type' clause here}}404#pragma acc routine worker device_type(*) worker405  void Func39();406  // expected-error@+3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' conflicts with the 'worker' clause before the first 'device_type'}}407  // expected-note@+2{{previous 'worker' clause is here}}408  // expected-note@+1{{active 'device_type' clause here}}409#pragma acc routine worker device_type(*) vector410  void Func40();411  // expected-error@+3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' conflicts with the 'worker' clause before the first 'device_type'}}412  // expected-note@+2{{previous 'worker' clause is here}}413  // expected-note@+1{{active 'device_type' clause here}}414#pragma acc routine worker device_type(*) seq415  void Func41();416  // expected-error@+3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' conflicts with the 'vector' clause before the first 'device_type'}}417  // expected-note@+2{{previous 'vector' clause is here}}418  // expected-note@+1{{active 'device_type' clause here}}419#pragma acc routine vector device_type(*) gang420  void Func42();421  // expected-error@+3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' conflicts with the 'vector' clause before the first 'device_type'}}422  // expected-note@+2{{previous 'vector' clause is here}}423  // expected-note@+1{{active 'device_type' clause here}}424#pragma acc routine vector device_type(*) worker425  void Func43();426  // expected-error@+3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' conflicts with the 'vector' clause before the first 'device_type'}}427  // expected-note@+2{{previous 'vector' clause is here}}428  // expected-note@+1{{active 'device_type' clause here}}429#pragma acc routine vector device_type(*) vector430  void Func44();431  // expected-error@+3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' conflicts with the 'vector' clause before the first 'device_type'}}432  // expected-note@+2{{previous 'vector' clause is here}}433  // expected-note@+1{{active 'device_type' clause here}}434#pragma acc routine vector device_type(*) seq435  void Func45();436  // expected-error@+3{{OpenACC clause 'gang' after 'device_type' clause on a 'routine' conflicts with the 'seq' clause before the first 'device_type'}}437  // expected-note@+2{{previous 'seq' clause is here}}438  // expected-note@+1{{active 'device_type' clause here}}439#pragma acc routine seq device_type(*) gang440  void Func46();441  // expected-error@+3{{OpenACC clause 'worker' after 'device_type' clause on a 'routine' conflicts with the 'seq' clause before the first 'device_type'}}442  // expected-note@+2{{previous 'seq' clause is here}}443  // expected-note@+1{{active 'device_type' clause here}}444#pragma acc routine seq device_type(*) worker445  void Func47();446  // expected-error@+3{{OpenACC clause 'vector' after 'device_type' clause on a 'routine' conflicts with the 'seq' clause before the first 'device_type'}}447  // expected-note@+2{{previous 'seq' clause is here}}448  // expected-note@+1{{active 'device_type' clause here}}449#pragma acc routine seq device_type(*) vector450  void Func48();451  // expected-error@+3{{OpenACC clause 'seq' after 'device_type' clause on a 'routine' conflicts with the 'seq' clause before the first 'device_type'}}452  // expected-note@+2{{previous 'seq' clause is here}}453  // expected-note@+1{{active 'device_type' clause here}}454#pragma acc routine seq device_type(*) seq455  void Func49();456 457  // Conflicts within same device_type458  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}459  // expected-note@+2{{previous 'gang' clause is here}}460  // expected-note@+1{{active 'device_type' clause here}}461#pragma acc routine device_type(*) gang gang462  void Func50();463  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}464  // expected-note@+2{{previous 'gang' clause is here}}465  // expected-note@+1{{active 'device_type' clause here}}466#pragma acc routine device_type(*) gang worker467  void Func51();468  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}469  // expected-note@+2{{previous 'gang' clause is here}}470  // expected-note@+1{{active 'device_type' clause here}}471#pragma acc routine device_type(*) gang vector472  void Func52();473  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}474  // expected-note@+2{{previous 'gang' clause is here}}475  // expected-note@+1{{active 'device_type' clause here}}476#pragma acc routine device_type(*) gang seq477  void Func53();478  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}479  // expected-note@+2{{previous 'worker' clause is here}}480  // expected-note@+1{{active 'device_type' clause here}}481#pragma acc routine device_type(*) worker gang482  void Func54();483  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}484  // expected-note@+2{{previous 'worker' clause is here}}485  // expected-note@+1{{active 'device_type' clause here}}486#pragma acc routine device_type(*) worker worker487  void Func55();488  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}489  // expected-note@+2{{previous 'worker' clause is here}}490  // expected-note@+1{{active 'device_type' clause here}}491#pragma acc routine device_type(*) worker vector492  void Func56();493  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}494  // expected-note@+2{{previous 'worker' clause is here}}495  // expected-note@+1{{active 'device_type' clause here}}496#pragma acc routine device_type(*) worker seq497  void Func57();498  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}499  // expected-note@+2{{previous 'vector' clause is here}}500  // expected-note@+1{{active 'device_type' clause here}}501#pragma acc routine device_type(*) vector gang502  void Func58();503  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}504  // expected-note@+2{{previous 'vector' clause is here}}505  // expected-note@+1{{active 'device_type' clause here}}506#pragma acc routine device_type(*) vector worker507  void Func59();508  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}509  // expected-note@+2{{previous 'vector' clause is here}}510  // expected-note@+1{{active 'device_type' clause here}}511#pragma acc routine device_type(*) vector vector512  void Func60();513  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}514  // expected-note@+2{{previous 'vector' clause is here}}515  // expected-note@+1{{active 'device_type' clause here}}516#pragma acc routine device_type(*) vector seq517  void Func61();518  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}519  // expected-note@+2{{previous 'seq' clause is here}}520  // expected-note@+1{{active 'device_type' clause here}}521#pragma acc routine device_type(*) seq gang522  void Func62();523  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}524  // expected-note@+2{{previous 'seq' clause is here}}525  // expected-note@+1{{active 'device_type' clause here}}526#pragma acc routine device_type(*) seq worker527  void Func63();528  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}529  // expected-note@+2{{previous 'seq' clause is here}}530  // expected-note@+1{{active 'device_type' clause here}}531#pragma acc routine device_type(*) seq vector532  void Func64();533  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}534  // expected-note@+2{{previous 'seq' clause is here}}535  // expected-note@+1{{active 'device_type' clause here}}536#pragma acc routine device_type(*) seq seq537  void Func65();538 539  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}540  // expected-note@+2{{previous 'gang' clause is here}}541  // expected-note@+1{{active 'device_type' clause here}}542#pragma acc routine device_type(*) gang gang device_type(nvidia) seq543  void Func66();544  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}545  // expected-note@+2{{previous 'gang' clause is here}}546  // expected-note@+1{{active 'device_type' clause here}}547#pragma acc routine device_type(*) gang worker device_type(nvidia) seq548  void Func67();549  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}550  // expected-note@+2{{previous 'gang' clause is here}}551  // expected-note@+1{{active 'device_type' clause here}}552#pragma acc routine device_type(*) gang vector device_type(nvidia) seq553  void Func68();554  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}555  // expected-note@+2{{previous 'gang' clause is here}}556  // expected-note@+1{{active 'device_type' clause here}}557#pragma acc routine device_type(*) gang seq device_type(nvidia) seq558  void Func69();559  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}560  // expected-note@+2{{previous 'worker' clause is here}}561  // expected-note@+1{{active 'device_type' clause here}}562#pragma acc routine device_type(*) worker gang device_type(nvidia) seq563  void Func70();564  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}565  // expected-note@+2{{previous 'worker' clause is here}}566  // expected-note@+1{{active 'device_type' clause here}}567#pragma acc routine device_type(*) worker worker device_type(nvidia) seq568  void Func71();569  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}570  // expected-note@+2{{previous 'worker' clause is here}}571  // expected-note@+1{{active 'device_type' clause here}}572#pragma acc routine device_type(*) worker vector device_type(nvidia) seq573  void Func72();574  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}575  // expected-note@+2{{previous 'worker' clause is here}}576  // expected-note@+1{{active 'device_type' clause here}}577#pragma acc routine device_type(*) worker seq device_type(nvidia) seq578  void Func73();579  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}580  // expected-note@+2{{previous 'vector' clause is here}}581  // expected-note@+1{{active 'device_type' clause here}}582#pragma acc routine device_type(*) vector gang device_type(nvidia) seq583  void Func74();584  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}585  // expected-note@+2{{previous 'vector' clause is here}}586  // expected-note@+1{{active 'device_type' clause here}}587#pragma acc routine device_type(*) vector worker device_type(nvidia) seq588  void Func75();589  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}590  // expected-note@+2{{previous 'vector' clause is here}}591  // expected-note@+1{{active 'device_type' clause here}}592#pragma acc routine device_type(*) vector vector device_type(nvidia) seq593  void Func76();594  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}595  // expected-note@+2{{previous 'vector' clause is here}}596  // expected-note@+1{{active 'device_type' clause here}}597#pragma acc routine device_type(*) vector seq device_type(nvidia) seq598  void Func77();599  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}600  // expected-note@+2{{previous 'seq' clause is here}}601  // expected-note@+1{{active 'device_type' clause here}}602#pragma acc routine device_type(*) seq gang device_type(nvidia) seq603  void Func78();604  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}605  // expected-note@+2{{previous 'seq' clause is here}}606  // expected-note@+1{{active 'device_type' clause here}}607#pragma acc routine device_type(*) seq worker device_type(nvidia) seq608  void Func79();609  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}610  // expected-note@+2{{previous 'seq' clause is here}}611  // expected-note@+1{{active 'device_type' clause here}}612#pragma acc routine device_type(*) seq vector device_type(nvidia) seq613  void Func80();614  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}615  // expected-note@+2{{previous 'seq' clause is here}}616  // expected-note@+1{{active 'device_type' clause here}}617#pragma acc routine device_type(*) seq seq device_type(nvidia) seq618  void Func81();619 620  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}621  // expected-note@+2{{previous 'gang' clause is here}}622  // expected-note@+1{{active 'device_type' clause here}}623#pragma acc routine device_type(nvidia) seq device_type(*) gang gang624  void Func82();625  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}626  // expected-note@+2{{previous 'gang' clause is here}}627  // expected-note@+1{{active 'device_type' clause here}}628#pragma acc routine device_type(nvidia) seq device_type(*) gang worker629  void Func83();630  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}631  // expected-note@+2{{previous 'gang' clause is here}}632  // expected-note@+1{{active 'device_type' clause here}}633#pragma acc routine device_type(nvidia) seq device_type(*) gang vector634  void Func84();635  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'gang' clause applying to the same 'device_type'}}636  // expected-note@+2{{previous 'gang' clause is here}}637  // expected-note@+1{{active 'device_type' clause here}}638#pragma acc routine device_type(nvidia) seq device_type(*) gang seq639  void Func85();640  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}641  // expected-note@+2{{previous 'worker' clause is here}}642  // expected-note@+1{{active 'device_type' clause here}}643#pragma acc routine device_type(nvidia) seq device_type(*) worker gang644  void Func86();645  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}646  // expected-note@+2{{previous 'worker' clause is here}}647  // expected-note@+1{{active 'device_type' clause here}}648#pragma acc routine device_type(nvidia) seq device_type(*) worker worker649  void Func87();650  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}651  // expected-note@+2{{previous 'worker' clause is here}}652  // expected-note@+1{{active 'device_type' clause here}}653#pragma acc routine device_type(nvidia) seq device_type(*) worker vector654  void Func88();655  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'worker' clause applying to the same 'device_type'}}656  // expected-note@+2{{previous 'worker' clause is here}}657  // expected-note@+1{{active 'device_type' clause here}}658#pragma acc routine device_type(nvidia) seq device_type(*) worker seq659  void Func89();660  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}661  // expected-note@+2{{previous 'vector' clause is here}}662  // expected-note@+1{{active 'device_type' clause here}}663#pragma acc routine device_type(nvidia) seq device_type(*) vector gang664  void Func90();665  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}666  // expected-note@+2{{previous 'vector' clause is here}}667  // expected-note@+1{{active 'device_type' clause here}}668#pragma acc routine device_type(nvidia) seq device_type(*) vector worker669  void Func91();670  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}671  // expected-note@+2{{previous 'vector' clause is here}}672  // expected-note@+1{{active 'device_type' clause here}}673#pragma acc routine device_type(nvidia) seq device_type(*) vector vector674  void Func92();675  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'vector' clause applying to the same 'device_type'}}676  // expected-note@+2{{previous 'vector' clause is here}}677  // expected-note@+1{{active 'device_type' clause here}}678#pragma acc routine device_type(nvidia) seq device_type(*) vector seq679  void Func93();680  // expected-error@+3{{OpenACC clause 'gang' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}681  // expected-note@+2{{previous 'seq' clause is here}}682  // expected-note@+1{{active 'device_type' clause here}}683#pragma acc routine device_type(nvidia) seq device_type(*) seq gang684  void Func94();685  // expected-error@+3{{OpenACC clause 'worker' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}686  // expected-note@+2{{previous 'seq' clause is here}}687  // expected-note@+1{{active 'device_type' clause here}}688#pragma acc routine device_type(nvidia) seq device_type(*) seq worker689  void Func95();690  // expected-error@+3{{OpenACC clause 'vector' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}691  // expected-note@+2{{previous 'seq' clause is here}}692  // expected-note@+1{{active 'device_type' clause here}}693#pragma acc routine device_type(nvidia) seq device_type(*) seq vector694  void Func96();695  // expected-error@+3{{OpenACC clause 'seq' on a 'routine' directive conflicts with the 'seq' clause applying to the same 'device_type'}}696  // expected-note@+2{{previous 'seq' clause is here}}697  // expected-note@+1{{active 'device_type' clause here}}698#pragma acc routine device_type(nvidia) seq device_type(*) seq seq699  void Func97();700 701  // All fine?702#pragma acc routine device_type(*) gang device_type(nvidia) gang703  void Func98();704#pragma acc routine device_type(*) gang device_type(nvidia) worker705  void Func99();706#pragma acc routine device_type(*) gang device_type(nvidia) vector707  void Func100();708#pragma acc routine device_type(*) gang device_type(nvidia) seq709  void Func101();710#pragma acc routine device_type(*) worker device_type(nvidia) gang711  void Func102();712#pragma acc routine device_type(*) worker device_type(nvidia) worker713  void Func103();714#pragma acc routine device_type(*) worker device_type(nvidia) vector715  void Func104();716#pragma acc routine device_type(*) worker device_type(nvidia) seq717  void Func105();718#pragma acc routine device_type(*) vector device_type(nvidia) gang719  void Func106();720#pragma acc routine device_type(*) vector device_type(nvidia) worker721  void Func107();722#pragma acc routine device_type(*) vector device_type(nvidia) vector723  void Func108();724#pragma acc routine device_type(*) vector device_type(nvidia) seq725  void Func109();726#pragma acc routine device_type(*) seq device_type(nvidia) gang727  void Func110();728#pragma acc routine device_type(*) seq device_type(nvidia) worker729  void Func111();730#pragma acc routine device_type(*) seq device_type(nvidia) vector731  void Func112();732#pragma acc routine device_type(*) seq device_type(nvidia) seq733  void Func113();734 735}736 737namespace BindDupes {738  // expected-error@+2{{OpenACC clause 'bind' may not appear on the same construct as a 'bind' clause on a 'routine' construct}}739  // expected-note@+1{{previous 'bind' clause is here}}740#pragma acc routine seq bind(asdf) bind(asdf)741  void Func1();742  // expected-error@+2{{OpenACC clause 'bind' may not appear on the same construct as a 'bind' clause on a 'routine' construct}}743  // expected-note@+1{{previous 'bind' clause is here}}744#pragma acc routine seq bind(asdf) bind(asdf) device_type(*)745  void Func2();746  // expected-error@+3{{OpenACC clause 'bind' after 'device_type' clause on a 'routine' conflicts with the 'bind' clause before the first 'device_type'}}747  // expected-note@+2{{previous 'bind' clause is here}}748  // expected-note@+1{{active 'device_type' clause here}}749#pragma acc routine seq bind(asdf) device_type(*) bind(asdf)750  void Func3();751  // expected-error@+3{{OpenACC clause 'bind' after 'device_type' clause on a 'routine' conflicts with the 'bind' clause before the first 'device_type'}}752  // expected-note@+2{{previous 'bind' clause is here}}753  // expected-note@+1{{active 'device_type' clause here}}754#pragma acc routine seq bind(asdf) device_type(*) bind(asdf) device_type(*)755  void Func4();756  // expected-error@+3{{OpenACC clause 'bind' on a 'routine' directive conflicts with the 'bind' clause applying to the same 'device_type'}}757  // expected-note@+2{{previous 'bind' clause is here}}758  // expected-note@+1{{active 'device_type' clause here}}759#pragma acc routine seq device_type(*) bind(asdf) bind(asdf)760  void Func5();761  // expected-error@+3{{OpenACC clause 'bind' on a 'routine' directive conflicts with the 'bind' clause applying to the same 'device_type'}}762  // expected-note@+2{{previous 'bind' clause is here}}763  // expected-note@+1{{active 'device_type' clause here}}764#pragma acc routine seq device_type(*) bind(asdf) bind(asdf) device_type(*)765  void Func6();766  // expected-error@+3{{OpenACC clause 'bind' on a 'routine' directive conflicts with the 'bind' clause applying to the same 'device_type'}}767  // expected-note@+2{{previous 'bind' clause is here}}768  // expected-note@+1{{active 'device_type' clause here}}769#pragma acc routine seq device_type(*) bind(asdf) device_type(*) bind(asdf) bind(asdf)770  void Func7();771 772#pragma acc routine seq device_type(*) bind(asdf) device_type(*) bind(asdf)773  void Func8();774}775