This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/48335] [4.6/4.7 Regression] ICE in convert_move


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]