view gcc/testsuite/gnat.dg/opt61.adb @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
line wrap: on
line source

-- { dg-do run }
-- { dg-options "-O2" }

with Interfaces;
with Opt61_Pkg; use Opt61_Pkg;

procedure Opt61 is

   use type Interfaces.Integer_64;

   X : constant Int64 := 3125;
   Y : constant Int64 := 5;
   Z : constant Int64 := 10;
   Q, R: Int64;

begin
   Double_Divide (X, Y, Z, Q, R, False);
   if R /= 25 then
     raise Program_Error;
   end if;
end;