view gcc/testsuite/gnat.dg/object_size1.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 }

with Text_IO; use Text_IO;

procedure Object_Size1 is
  type Zero_Size_Type is (Solo);

  for Zero_Size_Type'Size use 0;
  for Zero_Size_Type'Object_Size use 0;  --  { dg-error "Object_Size must be positive" }
begin
  Put_Line (Zero_Size_Type'Size'Image);
  Put_Line (Zero_Size_Type'Object_Size'Image);
end Object_Size1;