clang-omp / clang

clang with OpenMP 3.1 and some elements of OpenMP 4.0 support
clang-omp.github.com
Other
91 stars 15 forks source link

ICE on dependent type var in private clause #1

Closed Trass3r closed 11 years ago

Trass3r commented 11 years ago
template<typename T>
int foo()
{
    typename T::data_t value;

    #pragma omp parallel for private(value)
    for (int i = 0; i < 5; i += 2)
    {
    }
}
$ clang -fopenmp -c test.cpp
clang: lib/Sema/SemaInit.cpp:5082: ExprResult clang::InitializationSequence::Perform(clang::Sema &, const clang::InitializedEntity &, const clang::InitializationKind &, MultiExprArg, clang::QualType *): Assertion `Kind.getKind() == InitializationKind::IK_Copy || Kind.isExplicitCast() || Kind.getKind() == InitializationKind::IK_DirectList' failed.
7  clang           0x0000000000baef4f clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>, clang::QualType*) + 303
8  clang           0x0000000000bfa9d9 clang::Sema::ActOnOpenMPPrivateClause(llvm::ArrayRef<clang::Expr*>, clang::SourceLocation, clang::SourceLocation) + 2201
clang-omp commented 11 years ago

Fixed