From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16134 invoked by alias); 6 Feb 2006 16:58:21 -0000 Received: (qmail 16122 invoked by uid 48); 6 Feb 2006 16:58:19 -0000 Date: Mon, 06 Feb 2006 16:58:00 -0000 Subject: [Bug middle-end/26134] New: fold *(float*)(&complex_float_var) into REALPART_EXPR X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg00527.txt.bz2 List-Id: 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 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