]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix wrong operator for universal_integer operands in instance
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 28 Jan 2022 10:04:06 +0000 (11:04 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 28 Jan 2022 10:06:20 +0000 (11:06 +0100)
commitb16a3dea1d1bfa3dde556af84b3592140320b605
treed16eec4f2dfe9f63cc624c317f1a9d7fb4a15b4b
parent6da86c254aa4d68aab2b1f501a88d53f8777178b
Fix wrong operator for universal_integer operands in instance

This is a regression present on mainline and 11 branch: the transformation
applied during expansion by Narrow_Large_Operation would incorrectly perform
name resolution for the operator again.

gcc/ada/
PR ada/104258
* exp_ch4.adb (Narrow_Large_Operation): Also copy the entity, if
any, when rewriting the operator node.

gcc/testsuite/
* gnat.dg/generic_comp.adb: New test.
gcc/ada/exp_ch4.adb
gcc/testsuite/gnat.dg/generic_comp.adb [new file with mode: 0644]