diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-01-09 10:21:51 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2024-01-09 10:24:57 +0100 |
commit | 4d3fd59953bcf423dd0859a2c6b95b5260aed71d (patch) | |
tree | bae8c75cbb523bf5a099bd90a394168c8e379a88 /gcc/testsuite/gnat.dg | |
parent | f34141730266600b615b91d563a85a0b60223b3e (diff) | |
download | gcc-4d3fd59953bcf423dd0859a2c6b95b5260aed71d.zip gcc-4d3fd59953bcf423dd0859a2c6b95b5260aed71d.tar.gz gcc-4d3fd59953bcf423dd0859a2c6b95b5260aed71d.tar.bz2 |
Fix internal error on anonymous access type equality
This is a small regression present on the mainline and 13 branch, in the
form of an internal error in gigi on anonymous access type equality. We
now need to also accept them for anonymous access types that point to
compatible object subtypes in the language sense.
gcc/ada/
* gcc-interface/utils2.cc (build_binary_op) <EQ_EXPR>: Relax
assertion for regular pointer types.
gcc/testsuite/
* gnat.dg/specs/anon4.ads: New test.
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/anon4.ads | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/anon4.ads b/gcc/testsuite/gnat.dg/specs/anon4.ads new file mode 100644 index 0000000..493cf60 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/anon4.ads @@ -0,0 +1,10 @@ +-- { dg-do compile } + +package Anon4 is + subtype I is Integer; + A : access I; + + Acc : access Integer; + + function F return Boolean is (A = Acc); +end Anon4; |