This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28473] [4.0/4.1/4.2 Regression] with -O, casting result of round(x) to uint64_t produces wrong values for x > INT_MAX
- From: "sayle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2006 23:22:06 -0000
- Subject: [Bug middle-end/28473] [4.0/4.1/4.2 Regression] with -O, casting result of round(x) to uint64_t produces wrong values for x > INT_MAX
- References: <bug-28473-13001@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from sayle at gcc dot gnu dot org 2006-07-25 23:22 -------
Subject: Bug 28473
Author: sayle
Date: Tue Jul 25 23:21:56 2006
New Revision: 115742
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115742
Log:
PR middle-end/28473
* 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.
* gcc.dg/fold-convround-1.c: New test case.
Added:
trunk/gcc/testsuite/gcc.dg/fold-convround-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/convert.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28473