r260591 - in /trunk/gcc: ada/ChangeLog ada/sem_...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Wed May 23 10:23:00 GMT 2018


Author: pmderodat
Date: Wed May 23 10:23:24 2018
New Revision: 260591

URL: https://gcc.gnu.org/viewcvs?rev=260591&root=gcc&view=rev
Log:
[Ada] Crash processing Valid_Scalars whose evaluation is always true

The compiler blows up generating code associated with occurrences of attribute
Valid_Scalars whose evaluation is always true. After this patch the following
test compiles fine.

2018-05-23  Javier Miranda  <miranda@adacore.com>

gcc/ada/

	* sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
	the warning on occurrences of this attribute whose evaluation is always
	true (since that subprogram aborts processing the attribute). In
	addition, replace the node by its boolean result 'True' (required
	because the backend has no knowledge of this attribute).

gcc/testsuite/

	* gnat.dg/valid_scalars1.adb: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/valid_scalars1.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_attr.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list