public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/48335] [4.6/4.7 Regression] ICE in convert_move
Date: Tue, 29 Mar 2011 15:12:00 -0000	[thread overview]
Message-ID: <bug-48335-4-8CKlSdrh0i@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48335-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-29 14:55:51 UTC ---
And:
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-sra" } */

typedef __float128 T __attribute__((__may_alias__));

struct S
{
  _Complex double d __attribute__((aligned (16)));
};

void bar (struct S);

void
foo (T x)
{
  struct S s;
  *(T *) &s.d = x;
  __real__ s.d *= 7.0;
  bar (s);
}

seems to be quietly miscompiled (instead of storing the 128 bit __float128 over
both real and imaginary parts (it is __may_alias__, so it should be fine
aliasing-wise) it converts the __float128 to double and stores just over real
part.  In 4.5 &s.d was present and s was addressable, but ADDR_EXPR in MEM_EXPR
is ignored and thus in 4.6 we happily put s into (concat:DC (reg:DF ...)
(reg:DF ...)).


  parent reply	other threads:[~2011-03-29 14:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 14:24 [Bug ada/48335] New: " jakub at gcc dot gnu.org
2011-03-29 14:25 ` [Bug ada/48335] " jakub at gcc dot gnu.org
2011-03-29 15:12 ` jakub at gcc dot gnu.org [this message]
2011-03-29 15:23 ` jakub at gcc dot gnu.org
2011-03-29 16:08 ` [Bug middle-end/48335] " jakub at gcc dot gnu.org
2011-03-30  9:07 ` jakub at gcc dot gnu.org
2011-03-30 10:05 ` jakub at gcc dot gnu.org
2011-03-30 10:47 ` rguenth at gcc dot gnu.org
2011-03-30 12:36 ` jakub at gcc dot gnu.org
2011-04-01 21:13 ` jakub at gcc dot gnu.org
2011-04-06 20:39 ` jakub at gcc dot gnu.org
2011-04-06 20:41 ` jakub at gcc dot gnu.org
2011-04-07 13:30 ` yufeng at gcc dot gnu.org
2021-05-05 13:26 ` rguenth at gcc dot gnu.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-48335-4-8CKlSdrh0i@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).