This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22019] [4.1 Regression] do_structure_copy ICE on Ada gnatlib
- From: "laurent at guerby dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jun 2005 19:33:37 -0000
- Subject: [Bug tree-optimization/22019] [4.1 Regression] do_structure_copy ICE on Ada gnatlib
- References: <20050611183034.22019.laurent@guerby.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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