This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81154] New: OpenMP with shared variable in a template class crash
- From: "mplaneta at os dot inf.tu-dresden.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Jun 2017 13:17:54 +0000
- Subject: [Bug c++/81154] New: OpenMP with shared variable in a template class crash
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81154
Bug ID: 81154
Summary: OpenMP with shared variable in a template class crash
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mplaneta at os dot inf.tu-dresden.de
Target Milestone: ---
Created attachment 41601
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41601&action=edit
Minimal example
Code compilation fails when following clauses are met:
1. In instantiation of a template class
2. There is a function overload
3. Inside one of the function overloads there is an OpenMP parallel for pragma
4. Pragma uses reduction or shared clause
5. A variable name is a function name (erroneously)
6. Compilation happens with -fopenmp (obviously)
The code is incorrect, but instead of adequate error message the compiler
crashes.
Bug exists in many versions of GCC, not only 7.1.