This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/81011] New: [6/7/8 Regression] ICE with #pragma omp task and inaccessible copy-constructor


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

            Bug ID: 81011
           Summary: [6/7/8 Regression] ICE with #pragma omp task and
                    inaccessible copy-constructor
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: error-recovery, ice-on-invalid-code, openmp
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

The following invalid code snippet triggers an ICE since GCC 6.1.0
(when compiled with -fopenmp):

==========================
class A
{
  A(const A&);
};

void foo(const A&);

void bar(const A& a)
{
#pragma omp task
  foo(a);
}
==========================

bug.cc: In function 'void bar(const A&)':
bug.cc:10:9: error: 'A::A(const A&)' is private within this context
 #pragma omp task
         ^~~
bug.cc:3:3: note: declared private here
   A(const A&);
   ^
during GIMPLE pass: omplower
bug.cc:10:9: internal compiler error: Segmentation fault
 #pragma omp task
         ^~~
0xd7564f crash_signal
        ../../gcc/gcc/toplev.c:338
0xc624f1 scan_sharing_clauses
        ../../gcc/gcc/omp-low.c:1405
0xc65f58 scan_omp_task
        ../../gcc/gcc/omp-low.c:1881
0xc65f58 scan_omp_1_stmt
        ../../gcc/gcc/omp-low.c:3170
0xae9376 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.c:568
0xae9570 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.c:51
0xae9441 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.c:595
0xae9570 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        ../../gcc/gcc/gimple-walk.c:51
0xc59b3d scan_omp
        ../../gcc/gcc/omp-low.c:3246
0xc6f35a execute_lower_omp
        ../../gcc/gcc/omp-low.c:8981
0xc6f35a execute
        ../../gcc/gcc/omp-low.c:9028
Please submit a full bug report, [etc.]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]