This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug other/43562] GCC ICE on optimize attribute




Sent from my iPhone

On Apr 19, 2010, at 12:02 AM, "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org > wrote:



------- Comment #11 from jakub at gcc dot gnu dot org 2010-04-19 07:02 -------
This change broke building wine on x86-64.


There was already a bug filed for this and a patch was committed today or yesterday to the trunk to fix this ice.



Distilled testcase:
__attribute__ ((ms_abi)) fn2 (int, int);
struct S { int s; };
struct T { int t; struct S *u; };

void
foo (struct T *x, void *y)
{
 int a, b, c, d;
 fn1 (0, &a, &b, &c, &d);
 x->u[x->t].s = fn2 (fn3 (), a);
 fn1 (y, &a, &b, &c, &d);
}

__attribute__ ((ms_abi)) void
bar (int x)
{
}

void
baz (int x)
{
}

now ICEs at -O2 on x86_64-linux with:
wineice.i: In function 'foo':
wineice.i:12: internal compiler error: in insert_save, at caller- save.c:1171
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Apparently setup_save_areas
saved_reg->slot
= assign_stack_local_1
(regno_save_mode[regno][1],
GET_MODE_SIZE (regno_save_mode[regno][1]), 0, true);
creates a slot where regno_save_mode[regno][1] for regno 4 is VOIDmode, and the
VOIDmode MEM which has MEM_ALIGN 0 then confuses everything.



--


jakub at gcc dot gnu dot org changed:

What |Removed |Added
--- --- ----------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |



http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43562




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]