[Ada] Restore context on failure in loading of renamed child unit

Pierre-Marie de Rodat derodat@adacore.com
Thu Jul 8 13:50:20 GMT 2021


When loading of renamed child unit failed, we didn't properly restore
the value of a global Parsing_Main_Extended_Source variable.

This is primarily a cleanup change; behaviour is not affected (perhaps
except for errors reported on complicated code that is illegal anyway).

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* lib-load.adb (Load): Replace early return with goto to properly
	restore context on failure.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 468 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210708/4c8beb38/attachment.bin>


More information about the Gcc-patches mailing list