------- Comment #6 from rguenth at gcc dot gnu dot org  2010-03-01 11:48 -------
Confirmed with a cross to hppa-linux.

I believe this is again related to DECL_VALUE_EXPR.  SRA does:

@@ -122,8 +60,9 @@

 <bb 2>:
   x.0 = x;
+  SR.3_7 = x.a;
   y.1_6 = y_1(D);
-  D.1959_2 = x.0.a;
+  D.1959_2 = SR.3_7;
   y.2_3 = y.1_6;
   if (D.1959_2 != y.2_3)
     goto <bb 3>;

but x is replaced with x.0 (callee copy).  SRA shouldn't undo this
(thus, never create replacements involving a DECL with DECL_HAS_VALUE_EXPR_P
set).

Reduced testcase:

typedef struct {
  _Complex double a;
  _Complex double b;
} Scf10;

void
check (Scf10 x, _Complex double y)
{
  if (x.a != y) __builtin_abort ();
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|hppa-unknown-linux-gnu      |
   GCC host triplet|hppa-unknown-linux-gnu      |
 GCC target triplet|hppa-unknown-linux-gnu      |hppa-unknown-linux-gnu,
                   |                            |hppa2.0w-hp-hpux11.11
           Priority|P3                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2010-03-01 11:48:54
               date|                            |


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

Reply via email to