This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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



------- Comment #6 from roger at eyesopen dot com  2006-07-25 20:02 -------
Grr.  I've just noticed richi has just assigned this patch to himself.
I also have a patch that been bootstrapped and has nearly finished
regression testing, that I was just about to post/commit.  richi what
does your fix look like?

Mine contains several copies of:

          if (!TARGET_C99_FUNCTIONS)
            break;
!         if (outprec < TYPE_PRECISION (long_integer_type_node)
!             || (outprec == TYPE_PRECISION (long_integer_type_node)
!                 && !TYPE_UNSIGNED (type)))
            fn = mathfn_built_in (s_intype, BUILT_IN_LCEIL);
+         else if (outprec == TYPE_PRECISION (long_long_integer_type_node)
+                  && !TYPE_UNSIGNED (type))
+           fn = mathfn_built_in (s_intype, BUILT_IN_LLCEIL);
          break;

[Serves me right for not assigning this when pinkia asked me to investigate.
 I knew there was a good reason I don't normally bother with recent PRs].


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28473


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]