public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/43311] missed 'movw' optimization.
Date: Wed, 25 Jan 2012 11:21:00 -0000 [thread overview]
Message-ID: <bug-43311-4-F2WuyBFFf9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-43311-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43311
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-25 11:13:40 UTC ---
(In reply to comment #3)
> Does the following code have undefined behavior?
>
> typedef struct { unsigned char b1, b2; } __attribute__((aligned(8))) S;
> void f( S const* s, unsigned char* b1, unsigned char* b2 )
> {
> *b1 = s->b1;
> *b2 = s->b2;
> }
>
> int main()
> {
> S s = { 1, 2 };
> f(&s, &s.b2, &s.b2);
> return s.b2 != 1;
> }
No, s.b2 should be 1.
next prev parent reply other threads:[~2012-01-25 11:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-43311-4@http.gcc.gnu.org/bugzilla/>
2012-01-25 0:02 ` pinskia at gcc dot gnu.org
2012-01-25 10:43 ` zsojka at seznam dot cz
2012-01-25 11:21 ` rguenth at gcc dot gnu.org [this message]
2012-01-25 13:15 ` zsojka at seznam dot cz
2012-01-25 13:21 ` jakub at gcc dot gnu.org
2022-01-05 23:28 ` pinskia at gcc dot gnu.org
2010-03-09 19:06 [Bug target/43311] New: " pluto at agmk dot net
2010-03-10 10:55 ` [Bug target/43311] " rguenth at gcc dot gnu dot org
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=bug-43311-4-F2WuyBFFf9@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).