This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for "FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error)"
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: "David Sherwood" <david dot sherwood at arm dot com>, <gcc-patches at gcc dot gnu dot org>, <vmakarov at redhat dot com>
- Date: Tue, 30 Sep 2014 12:09:49 +0100
- Subject: Re: Fix for "FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error)"
- Authentication-results: sourceware.org; auth=none
- References: <000001cfd995$c7bcafe0$57360fa0$ at arm dot com> <8738b9leiv dot fsf at e105548-lin dot cambridge dot arm dot com> <mvmwq8liky8 dot fsf at hawking dot suse dot de>
Andreas Schwab <schwab@suse.de> writes:
> Richard Sandiford <richard.sandiford@arm.com> writes:
>
>> @@ -315,7 +318,7 @@ struct ira_allocno
>> number (0, ...) - 2. Value -1 is used for allocnos spilled by the
>> reload (at this point pseudo-register has only one allocno) which
>> did not get stack slot yet. */
>> - short int hard_regno;
>> + int hard_regno : 16;
>
> If you want negative numbers you need to make that explicitly signed.
Are you sure? In:
struct { int i : 16; unsigned int j : 1; } x = { -1, 0 };
int foo (void) { return x.i; }
foo returns -1 rather than 65535. I can't see any precedent in gcc/*.[hc]
for explicitly marking bitfields as signed.
Thanks,
Richard