Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop while parsing OpenMP directive #25595

Closed
llvmbot opened this issue Oct 17, 2015 · 3 comments
Closed

Infinite loop while parsing OpenMP directive #25595

llvmbot opened this issue Oct 17, 2015 · 3 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@llvmbot
Copy link
Member

llvmbot commented Oct 17, 2015

Bugzilla Link 25221
Resolution FIXED
Resolved on Nov 07, 2018 00:22
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @alexey-bataev,@hfinkel

Extended Description

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.

@llvmbot
Copy link
Member Author

llvmbot commented Oct 17, 2015

assigned to @alexey-bataev

@alexey-bataev
Copy link
Member

Fixed in revision 250684.

@llvmbot
Copy link
Member Author

llvmbot commented Oct 20, 2015

Thanks! It is working well now!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

2 participants