openmp directive wrongly considered incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.7 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When compiling some code using the "default(none)" clause, I get the following gcc error:
szuckerm@
minimal.c: In function ‘minimal_omp’:
minimal.c:6:46: error: ‘B’ is predetermined ‘shared’ for ‘shared’
minimal.c:6:46: error: ‘A’ is predetermined ‘shared’ for ‘shared’
This happens at the parsing stage, so I don't think it is a libgomp error.
Here is the code:
/* A and B are shared/read only, but with default(none) I should have to actually specify it explicitly */
void
minimal_omp(double const * const A, double const * const B)
{
#pragma omp parallel default(none) shared(A,B)
{
double lsum = A[0] * B[0];
}
}
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: gcc-4.7 4.7.3-1ubuntu1
ProcVersionSign
Uname: Linux 3.8.0-26-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
Date: Mon Aug 12 11:19:47 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-06-18 (54 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: gcc-4.7
UpgradeStatus: No upgrade log present (probably fresh install)