aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-07-17 08:09:14 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-07-17 08:09:14 +0000
commit2bbc7940969ba1840d103c3f0c6af2de2e67c514 (patch)
tree672cf7cfb2bcd6fd572adb9d31a3a521416f8644 /gcc/ada/gcc-interface/utils.c
parent17d65c91925fd92a656eacc230c71d1def1eff42 (diff)
downloadgcc-2bbc7940969ba1840d103c3f0c6af2de2e67c514.zip
gcc-2bbc7940969ba1840d103c3f0c6af2de2e67c514.tar.gz
gcc-2bbc7940969ba1840d103c3f0c6af2de2e67c514.tar.bz2
[Ada] Missing check on illegal equality operation in subprogram
In Ada2012 it is illegal to declare an equality operation on an untagged type when the operation is primitive and the type is already frozem (see RM 4.5.2 (9.8)). previously the test to detect this illegality only examined declarations within a package. This patch covers the case where type and operation are both declared within a subprogram body. 2018-07-17 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch6.adb (Check_Untagged_Equality): Extend check to operations declared in the same scope as the operand type, when that scope is a procedure. gcc/testsuite/ * gnat.dg/equal3.adb: New testcase. From-SVN: r262788
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
0 files changed, 0 insertions, 0 deletions