aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_spark.adb
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-09 07:54:35 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-09 07:54:35 +0000
commit0ce858310c2bba03fc030f34f4217cb405020bcf (patch)
tree3f82d544f2d5d5e3a266c7624bc811652b51e7fc /gcc/ada/sem_spark.adb
parent16cc65b61a7c00920ff66d45d3b23a9e313dd1b8 (diff)
downloadgcc-0ce858310c2bba03fc030f34f4217cb405020bcf.zip
gcc-0ce858310c2bba03fc030f34f4217cb405020bcf.tar.gz
gcc-0ce858310c2bba03fc030f34f4217cb405020bcf.tar.bz2
[Ada] Wrong resolution of equality operator with overloaded operand
This patch fixes a code generation error on an equality operation one of whose operands is an overloaded call, and several equality operators are visible. The resolution would succes but in some cases the wrong entity was lwfton the equality node, leading to expansion with the wrong interpretation. If the equality operation is the operand of a negation, the resolution of the negation must make direct use of the equality resolution, 2019-07-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Equality_Op): If the node was overloaded, set properly the entity to which the node has been resolved. The original entity is the first one found during analysis, and is not necessarily the resolved one. (Resolve_Op_Not): If the argument of negation is an overloaded equality operation, call its resolution directly given that the context type does not participate in overload resolution. gcc/testsuite/ * gnat.dg/equal7.adb, gnat.dg/equal7_pkg.adb, gnat.dg/equal7_pkg.ads: New testcase. From-SVN: r273281
Diffstat (limited to 'gcc/ada/sem_spark.adb')
0 files changed, 0 insertions, 0 deletions