public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/38696]  New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing
@ 2009-01-02 13:30 laurent at guerby dot net
  2009-01-02 15:26 ` [Bug middle-end/38696] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: laurent at guerby dot net @ 2009-01-02 13:30 UTC (permalink / raw)
  To: gcc-bugs

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


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

* [Bug middle-end/38696] gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing
  2009-01-02 13:30 [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing laurent at guerby dot net
@ 2009-01-02 15:26 ` pinskia at gcc dot gnu dot org
  2009-01-10 13:32 ` laurent at guerby dot net
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-02 15:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-01-02 15:20 -------
Most likely needs to be skipped just like sparc as this is an unaligned access.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end


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


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

* [Bug middle-end/38696] gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing
  2009-01-02 13:30 [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing laurent at guerby dot net
  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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: laurent at guerby dot net @ 2009-01-10 13:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from laurent at guerby dot net  2009-01-10 13:31 -------
You mean adding:

/* { dg-skip-if "unaligned access" { arm*-*-* } "*" "" } */

?


-- 


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


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

* [Bug middle-end/38696] gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing
  2009-01-02 13:30 [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing laurent at guerby dot net
  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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-04-30  9:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ramana at gcc dot gnu dot org  2009-04-30 09:27 -------
Seems to work today on gcc50 with gcc 4.4.0 and trunk on the simulator .I don't
see these failures in recent testresults on gcc-testresults@ from the
auto-tester at gcc50.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug middle-end/38696] gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing
  2009-01-02 13:30 [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing laurent at guerby dot net
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-30 10:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-04-30 10:37 -------
For 4.3 try if -fno-tree-sra fixes the failures.


-- 


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


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

* [Bug middle-end/38696] gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing
  2009-01-02 13:30 [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing laurent at guerby dot net
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: ramana at gcc dot gnu dot org @ 2010-03-20 19:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ramana at gcc dot gnu dot org  2010-03-20 19:16 -------
Laurent,

Is this still a problem on 4.3 branch ? 

Ramana


-- 


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


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

* [Bug middle-end/38696] gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing
  2009-01-02 13:30 [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing laurent at guerby dot net
                   ` (4 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: laurent at guerby dot net @ 2010-03-20 19:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from laurent at guerby dot net  2010-03-20 19:26 -------
I haven't built 4.3 in a while, if this is fixed in 4.4 and 4.5 it's good
enough for me so feel free to close as WONTFIX for 4.3.


-- 


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


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

* [Bug middle-end/38696] gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing
  2009-01-02 13:30 [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing laurent at guerby dot net
                   ` (5 preceding siblings ...)
  2010-03-20 19:26 ` laurent at guerby dot net
@ 2010-03-20 19:33 ` ramana at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: ramana at gcc dot gnu dot org @ 2010-03-20 19:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ramana at gcc dot gnu dot org  2010-03-20 19:33 -------
As per the last comment.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WONTFIX


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


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

end of thread, other threads:[~2010-03-20 19:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-02 13:30 [Bug c/38696] New: gcc.dg/torture/pr37868.c wrong code at -O2 and above for 4.3 and trunk / bit packing laurent at guerby dot net
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

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