[Ada] Crash/infinite loop on program with multiple visibility errors

Pierre-Marie de Rodat derodat@adacore.com
Tue Jul 9 07:52:00 GMT 2019


This patch fixes the behavior of the compiler on a program with multiple
visibility errors. Previous to this fix the compiler would either crash
or enter an infinite loop on a declaration for the formal in a
subprogram declaration, when the parameter type was given by a selected
component that does not denote an entity. This patch also specializes
the error message when a local overloadable name has a homonym that is a
child package, which may containt an otherwise hidden interpreatation.

No simple reproducer.

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

2019-07-09  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch4.adb (Diagnose_Call): Improve error recovery when a
	local subprogram name hides a possible candidate name declared
	in a child package in the context of the current unit.
	* sem_ch6.adb (Process_Formals): Protect against malformed
	formal types when the parameter type does not denote an entity.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3386 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190709/aadffd33/attachment.bin>


More information about the Gcc-patches mailing list