public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/64182] New: [5 Regression] wide-int rounding division is broken
@ 2014-12-04 12:30 rguenth at gcc dot gnu.org
  2014-12-04 12:31 ` [Bug middle-end/64182] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-04 12:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64182

            Bug ID: 64182
           Summary: [5 Regression] wide-int rounding division is broken
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
                CC: rsandifo at gcc dot gnu.org

Testcase for gnat.dg/round_div.adb

-- { dg-do run }
-- { dg-options "-O3" }
procedure Round_Div is
   type Fixed is delta 1.0 range -2147483648.0 .. 2147483647.0;
   A : Fixed := 1.0;
   B : Fixed := 3.0;
   C : Integer;
   function Divide (X, Y : Fixed) return Integer is
   begin
      return Integer (X / Y);
   end;
begin
   C := Divide (A, B);
   if C /= 0 then
      raise Program_Error;
   end if;
end Round_Div;

Joseph pointed out round_mod_expr has the same issue.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-07-16  9:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-04 12:30 [Bug middle-end/64182] New: [5 Regression] wide-int rounding division is broken rguenth at gcc dot gnu.org
2014-12-04 12:31 ` [Bug middle-end/64182] " rguenth at gcc dot gnu.org
2014-12-08 19:10 ` jakub at gcc dot gnu.org
2014-12-09  9:00 ` jakub at gcc dot gnu.org
2014-12-10 14:51 ` rsandifo at gcc dot gnu.org
2014-12-10 14:52 ` rsandifo at gcc dot gnu.org
2014-12-10 15:27 ` jakub at gcc dot gnu.org
2014-12-12  0:59 ` zadeck at naturalbridge dot com
2014-12-12  7:53 ` rsandifo at gcc dot gnu.org
2014-12-17 12:39 ` mpolacek at gcc dot gnu.org
2015-01-05 10:13 ` [Bug middle-end/64182] " jakub at gcc dot gnu.org
2015-04-22 11:58 ` jakub at gcc dot gnu.org
2015-07-16  9:13 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).