[LLVMbugs] [Bug 10138] New: Assertion with aggregate minimization
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jun 14 17:19:41 PDT 2011
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: unassignedclangbugs at nondot.org
ReportedBy: Pidgeot18 at gmail.com
CC: llvmbugs at cs.uiuc.edu
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 at 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.
More information about the llvm-bugs
mailing list