From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17726 invoked by alias); 21 Jun 2008 16:42:19 -0000 Received: (qmail 17617 invoked by uid 48); 21 Jun 2008 16:41:36 -0000 Date: Sat, 21 Jun 2008 16:42:00 -0000 Message-ID: <20080621164136.17616.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/36578] cast to long double not taken into account when result stored to a double In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg01242.txt.bz2 ------- Comment #2 from rguenth at gcc dot gnu dot org 2008-06-21 16:41 ------- Testcase double foo (double x, double y) { return (long double)x * (long double)y; } where we fold the multiplication to x * y. This is only ok with -funsafe-math-optimizations (like any other conversions removing FP operations). It is of course also ok if we for some reason know that x * y is exactly representable in both double and long double. It is convert_to_real doing this optimization. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2008-06-21 16:41:36 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36578