[llvm-bugs] [Bug 25221] New: Infinite loop while parsing OpenMP directive
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 16 15:23:00 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=25221
Bug ID: 25221
Summary: Infinite loop while parsing OpenMP directive
Product: OpenMP
Version: unspecified
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Runtime Library
Assignee: unassignedbugs at nondot.org
Reporter: sfantao at us.ibm.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
While attempting to compile this code (bla.cpp):
//##################
int nested(int a){
#pragma omp parallel
++a;
auto F = [&](){
#pragma omp parallel
{
#pragma omp target
++a;
}
};
F();
return a;
}
//##################
With the frontend command:
clang -cc1 -internal-isystem $CLANG_PATH/bin/../lib/clang/3.8.0/include
-nostdsysteminc -fopenmp -x c++ -triple x86_64-unknown-unknown -o - bla.cpp
it gets into an infinite loop in the parser. Note that the code needs
-std=c++11, and adding this extra option makes the problem go away.
Nevertheless, the compiler should not run forever if the user forgets to add
that.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151016/2c3f16af/attachment.html>
More information about the llvm-bugs
mailing list