public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/42448]  New: Wrong code with _Complex char in structure
Date: Mon, 21 Dec 2009 13:18:00 -0000	[thread overview]
Message-ID: <bug-42448-1649@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2009-12-21 13:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 13:18 ubizjak at gmail dot com [this message]
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

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-42448-1649@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).