From: "Joseph S. Myers" <jsm@polyomino.org.uk>
To: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Cc: gcc@gcc.gnu.org
Subject: Re: SRA problem with uninitialzed fields
Date: Fri, 24 Sep 2004 19:02:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.61.0409241653470.24771@digraph.polyomino.org.uk> (raw)
In-Reply-To: <10409241623.AA01865@vlsi1.ultra.nyu.edu>
On Fri, 24 Sep 2004, Richard Kenner wrote:
> Well, look at the test case I sent. A mask is clearly required on the
> comparison (at least, I think so!), but the only mechanism to generate it
> is the hook, which is false for C++.
C++ generates the following for this testcase, which includes the mask.
In accordance with the differences between how the C and C++ standards
define bit-fields, it doesn't use the reduced-width types.
;; Function int sub1() (_Z4sub1v)
int sub1() ()
{
struct foo x;
<bb 0>:
x.f = x.f | 3;
return (BIT_FIELD_REF <x, 8, 0> & 3) == 3;
}
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
http://www.srcf.ucam.org/~jsm28/gcc/#c90status - status of C90 for GCC 4.0
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)
next prev parent reply other threads:[~2004-09-24 16:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-24 18:53 Richard Kenner
2004-09-24 19:02 ` Joseph S. Myers [this message]
2004-09-25 2:38 ` Robert Dewar
2004-09-25 2:59 ` Joseph S. Myers
-- strict thread matches above, loose matches on Subject: below --
2004-09-24 18:43 Richard Kenner
2004-09-24 18:50 ` Joseph S. Myers
2004-09-24 16:55 Richard Kenner
2004-09-24 18:23 ` Joseph S. Myers
2004-09-24 16:01 Richard Kenner
2004-09-24 16:16 ` Andrew Pinski
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=Pine.LNX.4.61.0409241653470.24771@digraph.polyomino.org.uk \
--to=jsm@polyomino.org.uk \
--cc=gcc@gcc.gnu.org \
--cc=kenner@vlsi1.ultra.nyu.edu \
/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).