view gcc/testsuite/gnat.dg/type_conv2.adb @ 152:2b5abeee2509

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

--  { dg-do compile }

package body Type_Conv2 is

   function Wrap (X : Integer) return Root'Class is
   begin
      return Der_I'(X => X);
   end Wrap;

   procedure Proc_Static is
      D : constant Der_I := Der_I (Wrap (0));  --  { dg-error "initialization of limited object requires aggregate or function call" }
   begin
      null;
   end Proc_Static;

end Type_Conv2;