[Ada] Fix problematic overloading of operator in Ada 95 mode
The change reverts the test deciding whether an initialization procedure
can be inherited from parent to derived type to the original
implementation, which allowed inheriting a null procedure.
This prevents the creation of another null initialization procedure for
the derived type, which in turn can avoid an artificial overloading
which can wreak havoc in the analysis of private declarations of a
package.
2018-12-03 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* exp_ch3.adb (Build_Record_Init_Proc): Inherit an
initialization procedure if it is present, even if it is null.
gcc/testsuite/
* gnat.dg/overload2.adb, gnat.dg/overload2_p.adb,
gnat.dg/overload2_p.ads, gnat.dg/overload2_q.adb,
gnat.dg/overload2_q.ads: New testcase.
From-SVN: r266753