Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Commit

Permalink
Bug 61 - LTO: internal compiler error: in build_dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain Buclaw committed Jun 9, 2013
1 parent ed8c3f6 commit 685e32b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
7 changes: 7 additions & 0 deletions gcc/d/ChangeLog
@@ -1,3 +1,10 @@
2013-06-09 Iain Buclaw <ibuclaw@gdcproject.org>

* d-builtins.c(d_init_builtins): Make d_unknown_type_node a
RECORD_TYPE.
* d-lang.cc(d_build_eh_type_type): Cast the returned typeinfo decl to
void pointer type.

2013-06-07 Iain Buclaw <ibuclaw@gdcproject.org>

* d-codegen.cc(IRState::var): Rename to get_decl_tree.
Expand Down
2 changes: 1 addition & 1 deletion gcc/d/d-builtins.c
Expand Up @@ -1178,7 +1178,7 @@ d_init_builtins (void)
D_TYPE_IMAGINARY_FLOAT (d_ireal_type_node) = 1;

/* Used for ModuleInfo, ClassInfo, and Interface decls. */
d_unknown_type_node = make_node (LANG_TYPE);
d_unknown_type_node = make_node (RECORD_TYPE);

{
/* Make sure we get a unique function type, so we can give
Expand Down
15 changes: 10 additions & 5 deletions gcc/d/d-lang.cc
Expand Up @@ -1594,11 +1594,16 @@ d_eh_personality (void)
static tree
d_build_eh_type_type (tree type)
{
TypeClass *d_type = (TypeClass *) build_dtype (type);
gcc_assert (d_type);
d_type = (TypeClass *) d_type->toBasetype();
gcc_assert (d_type->ty == Tclass);
return build_address (d_type->sym->toSymbol()->Stree);
Type *dtype = build_dtype (type);
Symbol *sym;

if (dtype)
dtype = dtype->toBasetype();

gcc_assert (dtype && dtype->ty == Tclass);
sym = ((TypeClass *) dtype)->sym->toSymbol();

return convert (ptr_type_node, build_address (sym->Stree));
}

void
Expand Down
2 changes: 1 addition & 1 deletion gcc/d/d-todt.cc
Expand Up @@ -111,7 +111,7 @@ dt_container2 (dt_t *dt)
}
}
else
dt = build_constructor (d_unknown_type_node, NULL);
dt = build_constructor (aggtype, NULL);

TYPE_FIELDS (aggtype) = fields;
TYPE_SIZE (aggtype) = size_binop (MULT_EXPR, offset, size_int (BITS_PER_UNIT));
Expand Down

0 comments on commit 685e32b

Please sign in to comment.