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++/56217] New: ICE: OpenMP: when combining shared() and a move constructor


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56217

             Bug #: 56217
           Summary: ICE: OpenMP: when combining shared() and a move
                    constructor
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: radford@blackbean.org


// ICE with shared(std::unique_ptr<> or equiv) when using: -fopenmp -std=c++11
-O1

template <typename T>
struct ptr {
    T *p;
    ptr() : p() {}
    ptr(ptr &) = delete;
    ptr(ptr &&o) : p(o) {}
    operator T *() { return p; }
};

static ptr<int> f()
{
    ptr<int> pt;
    #pragma omp task shared(pt)
    pt.p = 0;
    return pt;
}

int main(int c, char **v)
{
    #pragma omp parallel
    #pragma omp single    
    f();
}


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