[LLVMbugs] [Bug 7893] New: C++ codegen crash with statement expression and non-trivial copy constructor

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 14 16:07:34 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7893

           Summary: C++ codegen crash with statement expression and
                    non-trivial copy constructor
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Testcase:
struct A {
  A (int j);
  A (const A &j);
  A& operator= (const A &j);
};

void foo2()
{
  A b = ({ A a(1); a; });
}

Crashes with:
clang: CGExprAgg.cpp:798: void
clang::CodeGen::CodeGenFunction::EmitAggregateCopy(llvm::Value*, llvm::Value*,
clang::QualType, bool): Assertion `(Record->hasTrivialCopyConstructor() ||
Record->hasTrivialCopyAssignment()) && "Trying to aggregate-copy a type without
a trivial copy " "constructor or assignment operator"' failed.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list