public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/42196]  New: ICE when SRAing partial assigments to complex number
@ 2009-11-27 13:29 jamborm at gcc dot gnu dot org
  2009-11-27 22:22 ` [Bug middle-end/42196] " jamborm at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-11-27 13:29 UTC (permalink / raw)
  To: gcc-bugs

Not very surprisingly, I get ICEs at tree-sra.c:2148 when compiling
these two examples with the current trunk at -O[123] on x86-64-linux:

======================================================================
union U
{
  double d;
  __complex__ int c;
};

double gd;
extern double bar (union U);

double foo (int b, double d, int c1, int c2)
{
  union U u;
  double r;

  if (b)
    {
      u.d = d;
      r = u.d;
    }
  else
    {
      __real__ u.c = c1;
      __imag__ u.c = c2;
      r = bar (u);
    }

  return r;
}
======================================================================
union U
{
  __complex__ int ci;
  __complex__ float cf;
};

float gd;
extern float bar (union U);

float foo (int b, double f1, double f2, int c1, int c2)
{
  union U u;
  double r;

  if (b)
    {
      __real__ u.cf = f1;
      __imag__ u.cf = f2;
    }
  else
    {
      __real__ u.ci = c1;
      __imag__ u.ci = c2;
    }

  r = bar (u);
  return r;
}
======================================================================

Hopefully I know what needs to be done.

Martin


-- 
           Summary: ICE when SRAing partial assigments to complex number
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: jamborm at gcc dot gnu dot org
        ReportedBy: jamborm at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

end of thread, other threads:[~2009-12-11 23:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-27 13:29 [Bug middle-end/42196] New: ICE when SRAing partial assigments to complex number jamborm at gcc dot gnu dot org
2009-11-27 22:22 ` [Bug middle-end/42196] " jamborm at gcc dot gnu dot org
2009-11-28 12:37 ` steven at gcc dot gnu dot org
2009-11-30 18:00 ` jamborm at gcc dot gnu dot org
2009-11-30 18:17 ` jamborm at gcc dot gnu dot org
2009-12-01 19:42 ` [Bug middle-end/42196] [4.5 Regression] " pinskia at gcc dot gnu dot org
2009-12-11 23:41 ` hjl 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).