Commit 56bad7db by Eric Botcazou Committed by Pierre-Marie de Rodat

[Ada] Fix an ICE on instantiated subprogram with -gnatc

The following should compile quietly:

$ gcc -c p-proc.ads -gnatc

procedure P.Proc is new G;

with Q;

package P is

  generic procedure G;

end P;

with System;
with Unchecked_Conversion;

package Q is

  generic package Inner_G is

    type T is access all Integer;

    function Cnv is new Unchecked_Conversion (System.Address, T);

  end Inner_G;

end Q;

2018-12-11  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* gcc-interface/trans.c (elaborate_all_entities_for_package):
	Skip aliasing subprograms.

From-SVN: r266984
parent acbdd83d
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (elaborate_all_entities_for_package):
Skip aliasing subprograms.
2018-12-11 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Update gnatmetric
......
......@@ -9278,7 +9278,9 @@ elaborate_all_entities_for_package (Entity_Id gnat_package)
continue;
if (kind == E_Operator)
continue;
if (IN (kind, Subprogram_Kind) && Is_Intrinsic_Subprogram (gnat_entity))
if (IN (kind, Subprogram_Kind)
&& (Present (Alias (gnat_entity))
|| Is_Intrinsic_Subprogram (gnat_entity)))
continue;
if (Is_Itype (gnat_entity))
continue;
......
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