This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/30325] New: shared clauses for const variables are illigal


Compiling the following code with "gcc -fopenmp -O -Wall"
I get a hosed error message:

============================
void foo()
{
  int A[20]; 
  const int x = 3;

  #pragma omp parallel for shared(x)
  for(i = 0; i < 20; i++) 
    A[i] = x;    }
}
============================

foo.c: In function 'foo':
foo.c:8: error: 'x' is predetermied 'shared' for 'shared'


-- 
           Summary: shared clauses for const variables are illigal
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kuba at et dot pl


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30325


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]