public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Andreas Schwab <schwab@suse.de>
Cc: "David Sherwood" <david.sherwood@arm.com>,
	 <gcc-patches@gcc.gnu.org>,  <vmakarov@redhat.com>
Subject: Re: Fix for "FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error)"
Date: Tue, 30 Sep 2014 11:09:00 -0000	[thread overview]
Message-ID: <87y4t1jreq.fsf@e105548-lin.cambridge.arm.com> (raw)
In-Reply-To: <mvmwq8liky8.fsf@hawking.suse.de> (Andreas Schwab's message of	"Tue, 30 Sep 2014 10:14:39 +0200")

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

  reply	other threads:[~2014-09-30 11:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 14:26 David Sherwood
2014-09-30  8:05 ` Richard Sandiford
2014-09-30  8:14   ` Andreas Schwab
2014-09-30 11:09     ` Richard Sandiford [this message]
2014-09-30 11:51       ` Andreas Schwab
2014-09-30 13:53         ` Richard Earnshaw
2014-09-30 16:15           ` Joseph S. Myers
2014-09-30 19:34             ` Mike Stump
2014-10-01  8:50               ` Richard Earnshaw
2014-10-01 12:18                 ` Mike Stump
2014-10-01  7:26             ` Andreas Schwab
2014-10-01  7:28               ` David Sherwood
2014-10-03 10:18                 ` Richard Sandiford
  -- strict thread matches above, loose matches on Subject: below --
2014-09-08 11:48 David Sherwood
2014-09-05 14:52 David Sherwood
2014-09-09 20:18 ` Vladimir Makarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4t1jreq.fsf@e105548-lin.cambridge.arm.com \
    --to=richard.sandiford@arm.com \
    --cc=david.sherwood@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=schwab@suse.de \
    --cc=vmakarov@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).