https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81130

            Bug ID: 81130
           Summary: ICE OpenMP shared clause in gimplify_var_or_parm_decl,
                    at gimplify.c:2584
           Product: gcc
           Version: 7.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jagapeyev at gmail dot com
  Target Milestone: ---

Created attachment 41586
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41586&action=edit
Output of gcc -v -save-temps

template<int, typename> struct d {d();};
template<int, typename...> struct e;
template<int f, typename g> struct e<f, g> : d<f, g> {};
template<typename... h> class i : e<0, h...> {};
template<typename, typename j> class k {i<j> l;};
template<typename c, typename j = c> class m {k<c, j> l;};

class n {
 m<int> p;
public:
 n() {
#pragma omp parallel shared(p)
  for(;;);
 }
};
main() {n o;}

----------------------------------------------------------------

Removal of the shared clause eliminates the error.

Reply via email to