aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-01-14 00:05:54 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-10 08:19:23 +0000
commit7f8053225de072fed9c4822e589c853a6f5e47c4 (patch)
tree3cca2df6a508114bb16be38e971920fb4d707482 /gcc/testsuite/gnat.dg
parent6798cad793d9581936f2de76c85a22a5449d7358 (diff)
downloadgcc-7f8053225de072fed9c4822e589c853a6f5e47c4.zip
gcc-7f8053225de072fed9c4822e589c853a6f5e47c4.tar.gz
gcc-7f8053225de072fed9c4822e589c853a6f5e47c4.tar.bz2
[Ada] Fix hiding of user-defined operator that is not a homograph
This adds a missing test for the presence of a homograph when applying the RM 8.4(10) clause about the visibility of operators, and removes resolution code made obsolete by the change. There is also a fixlet for a previously undetected ambiguity in the runtime. gcc/ada/ * sem_res.adb (Resolve_Eqyality_Op): Remove obsolete code. (Resolve_Op_Not): Likewise. * sem_type.adb (Disambiguate): Add missing test for RM 8.4(10). * libgnat/s-dwalin.adb (Enable_Cache): Fix ambiguity. (Symbolic_Address): Likewise. gcc/testsuite/ * gnat.dg/equal7.adb: Add expected error messages (code is now illegal).
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/equal7.adb10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/testsuite/gnat.dg/equal7.adb b/gcc/testsuite/gnat.dg/equal7.adb
index 2b27842..5e252a7 100644
--- a/gcc/testsuite/gnat.dg/equal7.adb
+++ b/gcc/testsuite/gnat.dg/equal7.adb
@@ -1,4 +1,4 @@
--- { dg-do run }
+-- { dg-do compile }
with Equal7_Pkg; use Equal7_Pkg;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
@@ -13,3 +13,11 @@ begin
null;
end if;
end;
+
+-- { dg-error "ambiguous expression \\(cannot resolve \"/=\"\\)" "" { target *-*-* } 9 }
+-- { dg-error "possible interpretation at a-strunb.ads:\\d+" "" { target *-*-* } 9 }
+-- { dg-error "possible interpretation in package Standard" "" { target *-*-* } 9 }
+
+-- { dg-error "ambiguous expression \\(cannot resolve \"=\"\\)" "" { target *-*-* } 12 }
+-- { dg-error "possible interpretation at a-strunb.ads:\\d+" "" { target *-*-* } 12 }
+-- { dg-error "possible interpretation in package Standard" "" { target *-*-* } 12 }