openmp directive wrongly considered incorrect

Bug #1211376 reported by Stéphane Zuckerman
6
This bug affects 1 person
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@evans201g:~/Programming/C/OpenMP$ gcc -fopenmp -c -std=c99 minimal.c
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
ProcVersionSignature: Ubuntu 3.8.0-26.38-generic 3.8.13.2
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)

Revision history for this message
Stéphane Zuckerman (stephane-zuckerman) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.