diff options
author | Javier Miranda <miranda@adacore.com> | 2018-05-24 13:06:28 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-05-24 13:06:28 +0000 |
commit | 24e959661f42da6c5c65de96a7c9d88082c3ffd8 (patch) | |
tree | 575ba6090c393eb39e9941dc6668e309bb1fcd35 /gcc/cppbuiltin.c | |
parent | 5a5925ee30a8f8b43d045726aa7b2a82c6a6af61 (diff) | |
download | gcc-24e959661f42da6c5c65de96a7c9d88082c3ffd8.zip gcc-24e959661f42da6c5c65de96a7c9d88082c3ffd8.tar.gz gcc-24e959661f42da6c5c65de96a7c9d88082c3ffd8.tar.bz2 |
[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.
From-SVN: r260664
Diffstat (limited to 'gcc/cppbuiltin.c')
0 files changed, 0 insertions, 0 deletions