From: Eric Botcazou Date: Fri, 4 Nov 2011 10:27:02 +0000 (+0000) Subject: decl.c (gnat_to_gnu_entity): Do not assert that the type of the parameters isn't... X-Git-Tag: releases/gcc-4.7.0~2514 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25ec1790d7c10ecdd9bbe7bf80a310b8b4d7841d;p=thirdparty%2Fgcc.git decl.c (gnat_to_gnu_entity): Do not assert that the type of the parameters isn't dummy in type_annotate_only... * gcc-interface/decl.c (gnat_to_gnu_entity) : Do not assert that the type of the parameters isn't dummy in type_annotate_only mode. From-SVN: r180931 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b422f32e1d3d..3c3c4870edaa 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2011-11-04 Eric Botcazou + + * gcc-interface/decl.c (gnat_to_gnu_entity) : Do not assert + that the type of the parameters isn't dummy in type_annotate_only mode. + 2011-11-04 Matthew Heaney * a-cdlili.ad[sb], a-cidlli.ad[sb], a-coorse.ad[sb], a-ciorse.ad[sb], diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 49434430ecd9..d7ca5dbbe6e2 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -4185,7 +4185,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) /* The failure of this assertion will very likely come from an order of elaboration issue for the type of the parameter. */ gcc_assert (kind == E_Subprogram_Type - || !TYPE_IS_DUMMY_P (gnu_param_type)); + || !TYPE_IS_DUMMY_P (gnu_param_type) + || type_annotate_only); if (gnu_param) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 24366e971d08..14f3baba745a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-11-04 Eric Botcazou + + * gnat.dg/specs/private1[-sub].ads: New test. + 2011-11-04 Mikael Morin PR fortran/43829 diff --git a/gcc/testsuite/gnat.dg/specs/private1-sub.ads b/gcc/testsuite/gnat.dg/specs/private1-sub.ads new file mode 100644 index 000000000000..0dcbbd0569c7 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/private1-sub.ads @@ -0,0 +1,13 @@ +-- { dg-do compile } +-- { dg-options "-gnatct" } + +package Private1.Sub is + + package Nested is + type T is limited private; + function "=" (X, Y : T) return Boolean; + private + type T is new Private1.T; + end Nested; + +end Private1.Sub; diff --git a/gcc/testsuite/gnat.dg/specs/private1.ads b/gcc/testsuite/gnat.dg/specs/private1.ads new file mode 100644 index 000000000000..4ef060043521 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/private1.ads @@ -0,0 +1,5 @@ +package Private1 is + type T is private; +private + type T is new Boolean; +end Private1;