[LLVMbugs] [Bug 6164] New: Assertion failed: ((D->field_begin() == D->field_end()) && "LayoutUnion - Align 0")

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jan 27 16:39:39 PST 2010


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

           Summary: Assertion failed: ((D->field_begin() == D->field_end())
                    && "LayoutUnion - Align 0")
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu


ddunbar at giles:tmp$ cat t.c
// ../../ABITestGen.py --no-unsigned --no-vector --no-complex --max-args 0 -o
inputs/test.7.a.c -T inputs/test.7.b.c -D inputs/test.7.driver.c --min=7
--count=1
// Generated: 2010-01-27 16:37
// Cardinality of function generator: inf
// Cardinality of type generator: inf

#include <stdio.h>
#include <string.h>
#include <assert.h>

typedef union T0 { char : 0; } T0;
extern T0 T0_retval;
T0 fn7(void);
static T0 T0_values[] = {
        { },
};
void test_fn7(void) {
  printf("fn7: testing return.\n");
  for (int i=0; i<1; ++i) {
    T0 RV;
    T0_retval = T0_values[i];
    RV = fn7();
  }
}
ddunbar at giles:tmp$ clang -c t.c
Assertion failed: ((D->field_begin() == D->field_end()) && "LayoutUnion - Align
0"), function LayoutUnion, file
/Volumes/Data/Users/ddunbar/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp,
line 210.
0  clang             0x0000000101299d37 PrintStackTrace(void*) + 38
1  clang             0x000000010129a2c5 SignalHandler(int) + 336
2  libSystem.B.dylib 0x00007fff819aeeaa _sigtramp + 26
3  libSystem.B.dylib 0x00007fff81953bea tiny_malloc_from_free_list + 1196
4  libSystem.B.dylib 0x00007fff81a2ae74 __pthread_markcancel + 0
5  clang             0x00000001001d62c2
clang::CodeGen::CGRecordLayoutBuilder::LayoutUnion(clang::RecordDecl const*) +
864
6  clang             0x00000001001d6abe
clang::CodeGen::CGRecordLayoutBuilder::Layout(clang::RecordDecl const*) + 104
7  clang             0x00000001001d6b7a
clang::CodeGen::CGRecordLayoutBuilder::ComputeLayout(clang::CodeGen::CodeGenTypes&,
clang::RecordDecl const*) + 80
8  clang             0x0000000100208236
clang::CodeGen::CodeGenTypes::ConvertTagDeclType(clang::TagDecl const*) + 748
9  clang             0x0000000100207ae0
clang::CodeGen::CodeGenTypes::ConvertNewType(clang::QualType) + 2316
10 clang             0x0000000100207edf
clang::CodeGen::CodeGenTypes::ConvertTypeRecursive(clang::QualType) + 179
11 clang             0x0000000100207180
clang::CodeGen::CodeGenTypes::ConvertTypeForMemRecursive(clang::QualType) + 30
12 clang             0x00000001002077dc
clang::CodeGen::CodeGenTypes::ConvertNewType(clang::QualType) + 1544
13 clang             0x0000000100207edf
clang::CodeGen::CodeGenTypes::ConvertTypeRecursive(clang::QualType) + 179
14 clang             0x00000001002085cc
clang::CodeGen::CodeGenTypes::ConvertType(clang::QualType) + 30
15 clang             0x0000000100191b46 (anonymous
namespace)::ConstExprEmitter::ConvertType(clang::QualType) + 40
16 clang             0x0000000100195ed5 (anonymous
namespace)::ConstExprEmitter::EmitArrayInitialization(clang::InitListExpr*) +
87
17 clang             0x0000000100193a99 (anonymous
namespace)::ConstExprEmitter::VisitInitListExpr(clang::InitListExpr*) + 215
18 clang             0x0000000100194860 clang::StmtVisitor<(anonymous
namespace)::ConstExprEmitter, llvm::Constant*>::Visit(clang::Stmt*) + 3322
19 clang             0x0000000100192955
clang::CodeGen::CodeGenModule::EmitConstantExpr(clang::Expr const*,
clang::QualType, clang::CodeGen::CodeGenFunction*) + 1723
20 clang             0x00000001001fcebf
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*) +
229
21 clang             0x00000001001fd750
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl)
+ 576
22 clang             0x00000001001fd99a
clang::CodeGen::CodeGenModule::EmitGlobal(clang::CodeGen::GlobalDecl) + 530
23 clang             0x00000001001fdbbf
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 547
24 clang             0x0000000100214470 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 76
25 clang             0x000000010003dd72 (anonymous
namespace)::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 144
26 clang             0x00000001003173ec clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 504
27 clang             0x0000000100060b7e
clang::ASTFrontendAction::ExecuteAction() + 256
28 clang             0x0000000100060c6e clang::FrontendAction::Execute() + 226
29 clang             0x000000010004611a
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 726
30 clang             0x0000000100025da5 cc1_main(char const**, char const**,
char const*, void*) + 1273
31 clang             0x0000000100029706 main + 252
32 clang             0x0000000100024e70 start + 52
Stack dump:
0.      Program arguments:
/Volumes/Data/Users/ddunbar/llvm.obj.64/Debug/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -S -disable-free -main-file-name t.c -pic-level 1
-mdisable-fp-elim -munwind-tables -target-cpu core2 -resource-dir
/Volumes/Data/Users/ddunbar/llvm.obj.64/Debug/lib/clang/1.1 -fmessage-length 88
-stack-protector 1 -fblocks -fdiagnostics-show-option -o
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-/cc-0ENDoH.s -x c t.c 
1.      t.c:16:1: current parser token 'void'
2.      t.c:13:11: LLVM IR generation of declaration 'T0_values'
3.      t.c:13:11: Generating code for declaration 'T0_values'
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)
ddunbar at giles:tmp$


-- 
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