------- Comment #1 from dfranke at gcc dot gnu dot org 2009-12-10 21:46 -------
Actually, the program
real :: x
complex :: c
c = c * x
end
is directly translated to ...
MAIN__ ()
{
complex(kind=4) c;
real(kind=4) x;
c = COMPLEX_EXPR <x, 0.0> * c;
}
... and yukka, the "optimized" dump has ...
real(kind=4) D.1522;
real(kind=4) D.1521;
real(kind=4) D.1520;
real(kind=4) D.1519;
real(kind=4) D.1518;
real(kind=4) D.1517;
real(kind=4) D.1516;
real(kind=4) D.1515;
real(kind=4) D.1514;
real(kind=4) D.1513;
real(kind=4) x;
complex(kind=4) c;
complex(kind=4) c.2;
complex(kind=4) c.1;
complex(kind=4) D.1510;
<bb 2>:
D.1510_2 = COMPLEX_EXPR <x_1(D), 0.0>;
c.1_3 = c;
D.1513_4 = REALPART_EXPR <D.1510_2>;
D.1514_5 = IMAGPART_EXPR <D.1510_2>;
D.1515_6 = REALPART_EXPR <c.1_3>;
D.1516_7 = IMAGPART_EXPR <c.1_3>;
D.1517_8 = D.1513_4 * D.1515_6;
D.1518_9 = D.1514_5 * D.1516_7;
D.1519_10 = D.1513_4 * D.1516_7;
D.1520_11 = D.1514_5 * D.1515_6;
D.1521_12 = D.1517_8 - D.1518_9;
D.1522_13 = D.1519_10 + D.1520_11;
c.2_14 = COMPLEX_EXPR <D.1521_12, D.1522_13>;
c = c.2_14;
return;
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-10 21:46:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40290