public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "laurent at guerby dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing Date: Fri, 02 Jan 2009 13:30:00 -0000 [thread overview] Message-ID: <bug-38696-7210@http.gcc.gnu.org/bugzilla/> (raw) GCC 4.3.2-1 debian gnueabi and trunk at rev 142984 generate wrong code at -O2 and above for pr37868.c guerby@gcc50:~$ /home/guerby/build-142984/gcc/xgcc -B/home/guerby/build-142984/gcc/ /home/guerby/trunk/gcc/testsuite/gcc.dg/torture/pr37868.c -O2 -lm -o ./pr37868.exeguerby@gcc50:~$ ./pr37868.exe Aborted guerby@gcc50:~$ cat /home/guerby/trunk/gcc/testsuite/gcc.dg/torture/pr37868.c /* { dg-do run } */ /* { dg-options "-fno-strict-aliasing" } */ /* { dg-skip-if "unaligned access" { sparc*-*-* } "*" "" } */ extern void abort (void); struct X { unsigned char pad : 4; unsigned int a : 32; unsigned int b : 24; unsigned int c : 6; } __attribute__((packed)); int main (void) { struct X x; unsigned int bad_bits; x.pad = -1; x.a = -1; x.b = -1; x.c = -1; bad_bits = ((unsigned int)-1) ^ *(1+(unsigned int *) &x); if (bad_bits != 0) abort (); return 0; } -- Summary: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: laurent at guerby dot net GCC build triplet: arm-linux-gnueabi GCC host triplet: arm-linux-gnueabi GCC target triplet: arm-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38696
next reply other threads:[~2009-01-02 13:30 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-01-02 13:30 laurent at guerby dot net [this message] 2009-01-02 15:26 ` [Bug middle-end/38696] " pinskia at gcc dot gnu dot org 2009-01-10 13:32 ` laurent at guerby dot net 2009-04-30 9:27 ` ramana at gcc dot gnu dot org 2009-04-30 10:37 ` rguenth at gcc dot gnu dot org 2010-03-20 19:16 ` ramana at gcc dot gnu dot org 2010-03-20 19:26 ` laurent at guerby dot net 2010-03-20 19:33 ` ramana 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-38696-7210@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: linkBe 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).