public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/42448]  New: Wrong code with _Complex char in structure
@ 2009-12-21 13:18 ubizjak at gmail dot com
  2009-12-21 13:19 ` [Bug target/42448] [4.3/4.4/4.5 Regression] " ubizjak at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2009-12-21 13:18 UTC (permalink / raw)
  To: gcc-bugs

Following testcase:

--cut here--
struct S2180
{
  char t;
  _Complex char u[2];
};

struct S2180 s2180;

int
main (void)
{
  volatile struct S2180 x;

  s2180.u[1] = 3 + 4i;

  x.u[1] = s2180.u[1];

  if (x.u[1] != s2180.u[1])
    abort ();

  return 0;
}
--cut here--

aborts for all optimization levels.

This bug shows in the testsuite of 4.4 branch [1]:

Running target unix
FAIL: tmpdir-gcc.dg-struct-layout-1/t024 c_compat_x_tst.o-c_compat_y_tst.o
execute 
FAIL: tmpdir-gcc.dg-struct-layout-1/t027 c_compat_x_tst.o-c_compat_y_tst.o
execute 

The bug is also present on 4.3 and 4.5.

[1] http://gcc.gnu.org/ml/gcc-testresults/2009-12/msg01241.html


-- 
           Summary: Wrong code with _Complex char in structure
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ubizjak at gmail dot com
 GCC build triplet: alpha-linux-gnu
  GCC host triplet: alpha-linux-gnu
GCC target triplet: alpha-linux-gnu


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


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

end of thread, other threads:[~2010-01-02 14:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-21 13:18 [Bug target/42448] New: Wrong code with _Complex char in structure ubizjak at gmail dot com
2009-12-21 13:19 ` [Bug target/42448] [4.3/4.4/4.5 Regression] " ubizjak at gmail dot com
2009-12-21 19:36 ` ubizjak at gmail dot com
2009-12-23  9:57 ` ubizjak at gmail dot com
2010-01-02 14:19 ` uros at gcc dot gnu dot org
2010-01-02 14:28 ` uros at gcc dot gnu dot org
2010-01-02 14:32 ` uros at gcc dot gnu dot org
2010-01-02 14:34 ` ubizjak at gmail dot com

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