Skip to content

Commit

Permalink
Merge pull request #2354 from WalterBright/fix10634
Browse files Browse the repository at this point in the history
fix Issue 10634 - Win64: wrong codegen with .int of small structs
  • Loading branch information
rainers authored and WalterBright committed Jul 17, 2013
1 parent eab5bf8 commit 2c851a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/backend/cgelem.c
Expand Up @@ -3020,8 +3020,6 @@ elem * elstruct(elem *e, goal_t goal)
return optelem(e, goal);
}

//printf("\tnumbytes = %d\n", (int)e->Enumbytes);

if (!e->ET)
return e;
//printf("\tnumbytes = %d\n", (int)type_size(e->ET));
Expand All @@ -3038,6 +3036,7 @@ elem * elstruct(elem *e, goal_t goal)
}

unsigned sz = type_size(e->ET);
//printf("\tsz = %d\n", (int)sz);
switch ((int)sz)
{
case 1: tym = TYchar; goto L1;
Expand All @@ -3052,7 +3051,7 @@ elem * elstruct(elem *e, goal_t goal)
case 6:
case 7: tym = TYllong;
L2:
if (config.exe == EX_WIN64)
if (e->Eoper == OPstrpar && config.exe == EX_WIN64)
{
goto L1;
}
Expand Down

0 comments on commit 2c851a4

Please sign in to comment.