Commit af3ded08 by Bob Duff Committed by Pierre-Marie de Rodat

[Ada] gnatbind: ghost code with -gnatQ

This patch fixes a bug where if a library unit is compiled with -gnatQ,
and that library unit is an ignored Ghost unit, then gnatbind silently
fails.

2018-12-11  Bob Duff  <duff@adacore.com>

gcc/ada/

	* gnat1drv.adb (gnat1drv): Pass the correct Object value when
	calling Write_ALI in the case of -gnatQ.
	* gnatbind.adb (Gnatbind): Avoid silent failure; give an error
	message.

From-SVN: r267004
parent 1d499c15
2018-12-11 Bob Duff <duff@adacore.com>
* gnat1drv.adb (gnat1drv): Pass the correct Object value when
calling Write_ALI in the case of -gnatQ.
* gnatbind.adb (Gnatbind): Avoid silent failure; give an error
message.
2018-12-11 Ed Schonberg <schonberg@adacore.com> 2018-12-11 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Needs_Fat_Pointer): A fat pointer is required if * exp_unst.adb (Needs_Fat_Pointer): A fat pointer is required if
......
...@@ -1452,10 +1452,11 @@ begin ...@@ -1452,10 +1452,11 @@ begin
Tree_Gen; Tree_Gen;
-- Generate ALI file if specially requested, or for missing subunits, -- Generate ALI file if specially requested, or for missing subunits,
-- subunits or predefined generic. -- subunits or predefined generic. For ignored ghost code, the object
-- file IS generated, so Object should be True.
if Opt.Force_ALI_Tree_File then if Opt.Force_ALI_Tree_File then
Write_ALI (Object => False); Write_ALI (Object => Is_Ignored_Ghost_Unit (Main_Unit_Node));
end if; end if;
Namet.Finalize; Namet.Finalize;
......
...@@ -790,6 +790,7 @@ begin ...@@ -790,6 +790,7 @@ begin
-- Quit if some file needs compiling -- Quit if some file needs compiling
if No_Object_Specified then if No_Object_Specified then
Error_Msg ("no object specified");
raise Unrecoverable_Error; raise Unrecoverable_Error;
end if; end if;
......
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