llvm-project
llvm-project copied to clipboard
Omitting the optional variable-category of defaultmap clause causes Clang to abort
| Bugzilla Link | 45469 |
| Resolution | FIXED |
| Resolved on | Apr 09, 2020 06:55 |
| Version | 10.0 |
| OS | Linux |
| CC | @alexey-bataev |
| Fixed by commit(s) | ec2752730d463c92d522dd25287b4e40a1c50597 |
Extended Description
In OMP spec 5.0:
The syntax of the defaultmap clause is as follows:
defaultmap(implicit-behavior[:variable-category])
But current clang give error when omitting variable-category
cmplrllvm-11546>clang -cc1 -fopenmp -fopenmp-version=50 x.cpp x.cpp:4:45: warning: missing ':' after defaultmap modifier - ignoring #pragma omp target defaultmap(firstprivate) ^ x.cpp:4:45: error: expected 'scalar', 'aggregate', 'pointer' in OpenMP clause 'defaultmap' 1 warning and 1 error generated.
cmplrllvm-11546>cat x.cpp void implicit_maps_double_complex (int a){ double _Complex dc = (double)a;
#pragma omp target defaultmap(firstprivate) { dc *= dc; } }