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