Page MenuHomePhabricator

[OPENMP] issue error messages for multiple teams contructs in a target constructs

Authored by kkwli0 on Feb 4 2019, 7:58 AM.



The compiler does not generate any error messages if there are more than one teams construct inside a target constructs.

#pragma omp target
  #pragma omp teams
  {  ...  }

  #pragma omp teams
  { ... }

After the fix, the error messages are issued.

teams.c:4:9: error: target construct with nested teams region contains statements
      outside of the teams construct
#pragma omp target
teams.c:14:11: note: nested teams construct here
  #pragma omp teams
teams.c:9:11: note: directive outside teams construct here
  #pragma omp teams
1 error generated.

Diff Detail

Event Timeline

kkwli0 created this revision.Feb 4 2019, 7:58 AM
ABataev added inline comments.Feb 4 2019, 8:27 AM

just if (!OED || !isOpenMPTeamsDirective(OED->getDirectiveKind() || OMPTeamsFound)

kkwli0 marked 2 inline comments as done.Feb 4 2019, 12:31 PM
kkwli0 added inline comments.

Yep, it simplifies the logic.

kkwli0 updated this revision to Diff 185125.Feb 4 2019, 12:33 PM
kkwli0 marked an inline comment as done.

Update based on review comment.

This revision is now accepted and ready to land.Feb 4 2019, 12:35 PM
kkwli0 closed this revision.Feb 5 2019, 8:45 AM

Committed: r353186