r260664 - in /trunk/gcc: ada/ChangeLog ada/sem_...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Thu May 24 13:06:00 GMT 2018
Author: pmderodat
Date: Thu May 24 13:06:28 2018
New Revision: 260664
URL: https://gcc.gnu.org/viewcvs?rev=260664&root=gcc&view=rev
Log:
[Ada] Missing error on illegal access to discriminant
The compiler does not report an error on the illegal access to a renamed
discriminant when the actual object is a parameter of a subprogram.
2018-05-24 Javier Miranda <miranda@adacore.com>
gcc/ada/
* sem_ch3.adb (Is_Visible_Component): For untagged types add missing
check for renamed discriminants.
* sem_ch4.adb (Analyze_Overloaded_Selected_Component,
Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
Is_Visible_Component pass the associated selector node to allow
checking renamed discriminants on untagged types.
gcc/testsuite/
* gnat.dg/discr52.adb: New testcase.
Added:
trunk/gcc/testsuite/gnat.dg/discr52.adb
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/sem_ch3.adb
trunk/gcc/ada/sem_ch4.adb
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list