http://llvm.org/bugs/show_bug.cgi?id=10138
Summary: Assertion with aggregate minimization
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
The following file causes an error when compiling with clang++:
#include <string>
class outer {
public:
typedef struct {
bool a;
std::string b;
} Aggregate;
Aggregate getAgg() {
return (Aggregate){false, ""};
}
};
int main() {
outer tower;
outer::Aggregate res = tower.getAgg();
}
clang: /src/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp:910: 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.
I'm not entirely sure which svn revision I'm on, but this is the output from
svn info:
jcranmer@xochiquetzal /src/llvm/tools/clang $ svn info
Path: .
URL: http://llvm.org/svn/llvm-project/cfe/trunk
Repository Root: http://llvm.org/svn/llvm-project
Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
Revision: 132484
Node Kind: directory
Schedule: normal
Last Changed Author: akirtzidis
Last Changed Rev: 132481
Last Changed Date: 2011-06-02 13:01:46 -0700 (Thu, 02 Jun 2011)
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs