Commit 51c16e29 by Samuel Tardieu Committed by Samuel Tardieu

re PR ada/15808 (Illegal program not detected, RM 3.9.3(10))

    gcc/ada/
	PR ada/15808
	* sem_ch6.adb (Check_Private_Overriding): Check for generic packages
	as well.

    gcc/testsuite/
	PR ada/15808
	* gnat.dg/specs/abstract_private.ads: New.

From-SVN: r139190
parent 11b08ee9
2008-08-18 Samuel Tardieu <sam@rfc1149.net>
PR ada/15808
* sem_ch6.adb (Check_Private_Overriding): Check for generic packages
as well.
2008-08-17 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* adaint.c (_gnat_set_close_on_exec) [_WIN32]: Implement.
......@@ -6481,7 +6481,7 @@ package body Sem_Ch6 is
procedure Check_Private_Overriding (T : Entity_Id) is
begin
if Ekind (Current_Scope) = E_Package
if Is_Package_Or_Generic_Package (Current_Scope)
and then In_Private_Part (Current_Scope)
and then Visible_Part_Type (T)
and then not In_Instance
......
2008-08-18 Samuel Tardieu <sam@rfc1149.net>
PR ada/15808
* gnat.dg/specs/abstract_private.ads: New.
2008-08-18 Richard Guenther <rguenther@suse.de>
* gcc.dg/fold-alloca-1.c: Scan cfg dump instead of cleanup_cfg1.
......
generic
package Abstract_Private is
type T1 is abstract tagged private;
procedure P1 (X : T1) is abstract;
type T2 is abstract tagged private;
private
type T1 is abstract tagged null record;
procedure P2 (X : T1) is abstract; -- { dg-error "must be visible" }
type T2 is abstract new T1 with null record;
procedure P1 (X : T2) is abstract;
end Abstract_Private;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment