@@ -3712,7 +3712,7 @@ package body Exp_Ch3 is
and then not Is_Unchecked_Union (Rec_Type)
and then not Has_New_Non_Standard_Rep (Rec_Type)
and then not Parent_Subtype_Renaming_Discrims
- and then Has_Non_Null_Base_Init_Proc (Etype (Rec_Type))
+ and then Present (Base_Init_Proc (Etype (Rec_Type)))
then
Copy_TSS (Base_Init_Proc (Etype (Rec_Type)), Rec_Type);
new file mode 100644
@@ -0,0 +1,13 @@
+-- { dg-do compile }
+-- { dg-options "-gnat95" }
+
+with Overload2_P; use Overload2_P;
+with text_io; use text_io;
+procedure overload2 is
+ this, that: t;
+ yes : boolean := this /= that;
+begin
+ if not yes then
+ put_line ("FAILED");
+ end if;
+end;
new file mode 100644
@@ -0,0 +1,6 @@
+-- { dg-options "-gnat95 -gnatws" }
+
+package body overload2_p is
+ function "=" (this, that: t) return boolean is begin return True; end;
+ this, that : t;
+end;
new file mode 100644
@@ -0,0 +1,6 @@
+with overload2_q;
+package overload2_p is
+ type t is new overload2_q.t;
+private
+ function "=" (this, that: t) return boolean;
+end;
new file mode 100644
@@ -0,0 +1,5 @@
+-- { dg-options "-gnat95" }
+
+package body overload2_q is
+ function "=" (this, that: t) return boolean is begin return False; end;
+end;
new file mode 100644
@@ -0,0 +1,4 @@
+package overload2_q is
+ type t is null record;
+ function "=" (this, that: t) return boolean;
+end;