[Ada] Improper error message on equality op with different operand types
authorEd Schonberg <schonberg@adacore.com>
Mon, 12 Aug 2019 09:00:59 +0000 (09:00 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 12 Aug 2019 09:00:59 +0000 (09:00 +0000)
commit6ab24ed7528b0375c49e4416f825a90bdca63454
tree1d6e2c2b246d35fda44c4b7471e967412682ed46
parent2d56744e3bfcf3cc27f4100b1903b2443d858f13
[Ada] Improper error message on equality op with different operand types

2019-08-12  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_ch6.adb (heck_Untagged_Equality): Verify that user-defined
equality has the same profile as the predefined equality before
applying legality rule in RM 4.5.2 (9.8).

gcc/testsuite/

* gnat.dg/equal10.adb, gnat.dg/equal10.ads: New testcase.

From-SVN: r274297
gcc/ada/ChangeLog
gcc/ada/sem_ch6.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/equal10.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/equal10.ads [new file with mode: 0644]