From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9666 invoked by alias); 30 Jul 2006 13:22:15 -0000 Received: (qmail 9638 invoked by alias); 30 Jul 2006 13:22:08 -0000 Date: Sun, 30 Jul 2006 13:22:00 -0000 Message-ID: <20060730132208.9637.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/28473] [4.0 Regression] with -O, casting result of round(x) to uint64_t produces wrong values for x > INT_MAX In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sayle 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-07/txt/msg02282.txt.bz2 List-Id: ------- Comment #11 from sayle at gcc dot gnu dot org 2006-07-30 13:22 ------- Subject: Bug 28473 Author: sayle Date: Sun Jul 30 13:21:59 2006 New Revision: 115821 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115821 Log: PR middle-end/28473 Backport from mainline. * convert.c (convert_to_integer): When transforming (T)foo(x) into bar(x) check that bar's result type can represent all the values of T. * builtins.c (fold_fixed_mathfn): When long and long long are the same size, canonicalize llceil*, llfloor*, llround* and llrint* functions to their lceil*, lfloor*, lround* and lrint* forms. * gcc.dg/fold-convround-1.c: New test case. * gcc.dg/builtins-55.c: New test case. Added: branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/builtins-55.c branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/fold-convround-1.c Modified: branches/gcc-4_0-branch/gcc/ChangeLog branches/gcc-4_0-branch/gcc/builtins.c branches/gcc-4_0-branch/gcc/convert.c branches/gcc-4_0-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28473