locked
problem with omp parallel for default (none) RRS feed

  • Question

  • I believe taht there is a bug, introduced in Visual studio 2015 and also present in 2017, in case of a simple parallel for.
    See the following example:
    void fun(int y)
    {

    int i = 0;
    int  z[1000];

    #pragma omp parallel  for default (none) private(i) shared (z )
    for (i = 0; i<10; i++)
    {
         z[i] =
    y// This should trigger an an error (y is neither shared nor private )
    }
    z[i] =
    y;   // again no error by compiler

    }

    Sincerely
    Tommaso Astarita
    Thursday, March 16, 2017 10:28 AM