r266120 - in /trunk/gcc/ada: ChangeLog ghost.ad...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Wed Nov 14 11:42:00 GMT 2018


Author: pmderodat
Date: Wed Nov 14 11:41:14 2018
New Revision: 266120

URL: https://gcc.gnu.org/viewcvs?rev=266120&root=gcc&view=rev
Log:
[Ada] Crash on ignored Ghost assignment

This patch modifies the way analysis determine whether an assignment is
an ignored Ghost assignment. This is now achieved by preanalyzing a copy
of the left hand side in order to account for potential code generated
by the left hand side itself.

No small reproducer possible.

2018-11-14  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* ghost.adb (Ghost_Entity): New routine.
	(Mark_And_Set_Ghost_Assignment): Reimplemented.
	* sem_ch5.adb (Analyze_Assignment): Assess whether the target of
	the assignment is an ignored Ghost entity before analyzing the
	left hand side.
	* sem_ch8.adb (Find_Direct_Name): Update the subprogram
	signature. Do not generate markers and references when they are
	not desired.
	(Nvis_Messages): Do not execute when errors are not desired.
	(Undefined): Do not emit errors when they are not desired.
	* sem_ch8.ads (Find_Direct_Name): Update the subprogram
	signature and comment on usage.
	* sem_util.adb (Ultimate_Prefix): New routine.
	* sem_util.ads (Ultimate_Prefix): New routine.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/ghost.adb
    trunk/gcc/ada/sem_ch5.adb
    trunk/gcc/ada/sem_ch8.adb
    trunk/gcc/ada/sem_ch8.ads
    trunk/gcc/ada/sem_util.adb
    trunk/gcc/ada/sem_util.ads



More information about the Gcc-cvs mailing list