------- Additional Comments From laurent at guerby dot net 2005-06-14 19:33 ------- Here is a reduced test case from g-socket, it ICEs the same way at -O2.
As additional information, it looks like the problem happens when an array is determining the size of a discriminated record (which is max size of all case items of the record). -- file q.ads package Q is subtype Str is String (1 .. 2); type Inet_Addr_Type (Family : Boolean := False) is record case Family is when True => X : Str; when False => Y : Character; end case; end record; -- Note: ICE only if X'size > Y'Size, ie replace 2 by 1 it works, or -- replace Character by Integer it works. type Inet_Addr_Array is array (1 .. 1) of Inet_Addr_Type; function F (X : in Inet_Addr_Array) return Inet_Addr_Type; end Q; -- file q.adb package body Q is function F (X : in Inet_Addr_Array) return Inet_Addr_Type is begin return X(1); end F; end Q; -- What |Removed |Added ---------------------------------------------------------------------------- CC| |kenner at vlsi1 dot ultra | |dot nyu dot edu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22019