[Ada] gnatbind -f switch gives an error for duplicates
If the -felab-order.txt switch is given to gnatbind, and there are duplicate
unit names in elab-order.txt, an error will be given.
The following test should get errors:
this (spec) <-- that (body)
error: elab-order.txt:5: duplicate unit name "this (spec)" from line 1
error: elab-order.txt:7: duplicate unit name "that (body)" from line 3
gnatmake: *** bind failed.
Content of elab-order.txt (7 lines):
this%s
that%b
this (spec)
that%b
gnatmake -q -f -g -O0 -gnata that-main.adb -bargs -felab-order.txt
package body That is
end That;
package That is
pragma Elaborate_Body;
end That;
with This, That;
procedure That.Main is
begin
null;
end That.Main;
package body This is
end This;
package This is
pragma Elaborate_Body;
end This;
2018-01-11 Bob Duff <duff@adacore.com>
gcc/ada/
* binde.adb (Force_Elab_Order): Give an error if there are duplicate
unit names.
From-SVN: r256508