Skip to content

Commit

Permalink
Merge pull request #4829 from 9rnsr/fix14814
Browse files Browse the repository at this point in the history
[REG2.068a] Issue 14814 - ld: GOT load reloc does not point to a movq instruction
  • Loading branch information
MartinNowak committed Jul 25, 2015
2 parents 35d35f1 + afc3ace commit 3a8dc47
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/e2ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,7 @@ elem *toElem(Expression *e, IRState *irs)
if (Type *t = isType(e->obj))
{
result = getTypeInfo(t, irs);
result = el_bin(OPadd, result->Ety, result, el_long(TYsize_t, t->vtinfo->offset));
return;
}
if (Expression *ex = isExpression(e->obj))
Expand Down
11 changes: 11 additions & 0 deletions test/runnable/imports/link14814a.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module imports.link14814a;

void fun0()
{
}

void fun4()
{
void function()[TypeInfo] funs;
funs[typeid(int)] = &fun0;
}
10 changes: 10 additions & 0 deletions test/runnable/link14814.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// EXTRA_SOURCES: imports/link14814a.d
// PERMUTE_ARGS: -inline -release -g -O -fPIC
// COMPILE_SEPARATELY

import imports.link14814a;

void main()
{
fun4;
}

0 comments on commit 3a8dc47

Please sign in to comment.