public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/20794] New: [4.0/4.1 Regression] Miscompilation with __attribute ((aligned))
@ 2005-04-06 14:46 jakub at gcc dot gnu dot org
  2005-04-06 14:52 ` [Bug middle-end/20794] " pinskia at gcc dot gnu dot org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-04-06 14:46 UTC (permalink / raw)
  To: gcc-bugs

extern void abort (void);

typedef int T __attribute__((aligned));
struct S { T a[2]; } s;
void *p[2];

int
main (void)
{
  p[0] = &s.a[0];
  p[1] = &s.a[1];
  if (p[0] == p[1])
    abort ();
  return 0;
}

is miscompiled on at least i386, x86_64, ppc32 and ppc64, at all optimization
levels.  Works correctly in C++.

-- 
           Summary: [4.0/4.1 Regression] Miscompilation with __attribute
                    ((aligned))
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20794


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-09-27 16:18 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-06 14:46 [Bug c/20794] New: [4.0/4.1 Regression] Miscompilation with __attribute ((aligned)) jakub at gcc dot gnu dot org
2005-04-06 14:52 ` [Bug middle-end/20794] " pinskia at gcc dot gnu dot org
2005-04-06 15:05 ` jakub at gcc dot gnu dot org
2005-04-07 14:08 ` jakub at gcc dot gnu dot org
2005-04-07 14:13 ` kenner at vlsi1 dot ultra dot nyu dot edu
2005-04-07 14:27 ` jakub at gcc dot gnu dot org
2005-04-07 14:41 ` kenner at vlsi1 dot ultra dot nyu dot edu
2005-04-07 17:53 ` rth at gcc dot gnu dot org
2005-04-07 17:54 ` kenner at vlsi1 dot ultra dot nyu dot edu
2005-04-07 18:00 ` mmitchel at gcc dot gnu dot org
2005-04-07 18:03 ` kenner at vlsi1 dot ultra dot nyu dot edu
2005-04-07 18:08 ` mark at codesourcery dot com
2005-04-11 21:34 ` sje at cup dot hp dot com
2005-04-16 16:16 ` jsm28 at gcc dot gnu dot org
2005-04-17  2:43 ` mark at codesourcery dot com
2005-04-17  3:53 ` mmitchel at gcc dot gnu dot org
2005-04-17 11:04 ` joseph at codesourcery dot com
2005-04-17 17:06 ` [Bug middle-end/20794] [4.0/4.1 Regression] Arrays and pointer arithmetic on __attribute ((aligned)) types permitted mmitchel at gcc dot gnu dot org
2005-04-22 20:22 ` sje at cup dot hp dot com
2005-04-27  8:59 ` dorit at il dot ibm dot com
2005-04-27 19:44 ` sje at cup dot hp dot com
2005-05-02 14:15 ` dorit at il dot ibm dot com
2005-07-08  1:36 ` mmitchel at gcc dot gnu dot org
2005-09-27 16:19 ` mmitchel at gcc dot gnu dot org

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).