view gcc/testsuite/gnat.dg/addr15.adb @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

--  { dg-do run }

with System; use System;

procedure Addr15 is

  function Get_Bound (Param : Integer) return Integer is (Param);

  type Alpha_Typ is array (1 .. Get_Bound (1)) of Integer;
  type Beta_Typ  is array (1 .. Get_Bound (0)) of Integer;

  Alpha : Alpha_Typ;
  Beta  : aliased Beta_Typ;

begin
  if Alpha'Address = Beta'Address then
    raise Program_Error;
  end if;
end;