This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/26134] New: fold *(float*)(&complex_float_var) into REALPART_EXPR<complex_float_var>
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Feb 2006 16:58:19 -0000
- Subject: [Bug middle-end/26134] New: fold *(float*)(&complex_float_var) into REALPART_EXPR<complex_float_var>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I was looking at some code which is mentioned to be in SPEC 2006 (I forgot
where I found the mentioning)
but anyways it has the following in it:
typedef _Complex float COMPLEX_FLOAT;
float real_part(COMPLEX_FLOAT a)
{
return *(float*)(&a);
}
This should be converted to:
float real_part(COMPLEX_FLOAT a)
{
return __real__ a;
}
So that the tree optimizers can work on it easier.
--
Summary: fold *(float*)(&complex_float_var) into
REALPART_EXPR<complex_float_var>
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization, TREE
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26134