discr52.adb
498 Bytes
-
[Ada] Missing error on illegal access to discriminant · 24e95966
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
Javier Miranda committed