aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2024-07-08 14:45:55 -0700
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-08-02 09:08:05 +0200
commita846b4cfc7383e7a2550993cbf669b94db838069 (patch)
tree2eeedbb43b00717fffd9dc1800d86bbfff085b95 /gcc/ada/sem_res.adb
parent3067fdd87bfb5666460094ce9b783deb7b643145 (diff)
downloadgcc-a846b4cfc7383e7a2550993cbf669b94db838069.zip
gcc-a846b4cfc7383e7a2550993cbf669b94db838069.tar.gz
gcc-a846b4cfc7383e7a2550993cbf669b94db838069.tar.bz2
ada: Type conversion in instance incorrectly rejected.
In some cases, a legal type conversion in a generic package is correctly accepted but the corresponding type conversion in an instance of the generic is incorrectly rejected. gcc/ada/ * sem_res.adb (Valid_Conversion): Test In_Instance instead of In_Instance_Body.
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 8a18430..9a3b6dd 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -14697,7 +14697,7 @@ package body Sem_Res is
-- If it was legal in the generic, it's legal in the instance
- elsif In_Instance_Body then
+ elsif In_Instance then
return True;
-- Ignore privacy for streaming or Put_Image routines