[cfe-dev] bug in DSAAttrChecker class?

xiaohui chen xchen198812 at gmail.com
Tue Mar 3 14:04:31 PST 2015


Hi:

In file SemaOpenMP.cpp, there is a class named DSAAttrChecker.

Inside DSAAttrChecker class, there is a method function VisitDeclRefExpr()
which is used to check the data attribute of a variable inside a construct.

This is my testcase:

//global variable
int var;

void test()
{
   // orphaned task construct
    #pragma omp task
    {
        var;
     }
}

When I call VisitDeclRefExpr() fucniton, it determines that var is
firstprivate.
Apparently, var should be shared. Is this a bug?

Sincerely
xiaohui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150303/0a40b31d/attachment.html>


More information about the cfe-dev mailing list