aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2024-07-09 16:54:59 -0700
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-08-02 09:08:06 +0200
commit30ba62d91ff96b0f86cc1a8544dd1ed30196ca40 (patch)
treeaa5d9fc7d6392a887d370498b3ee0e9fcda38e83 /gcc/ada
parent04fd9ee038684469d5ae1be6dda3c3ebbd87e8b1 (diff)
downloadgcc-30ba62d91ff96b0f86cc1a8544dd1ed30196ca40.zip
gcc-30ba62d91ff96b0f86cc1a8544dd1ed30196ca40.tar.gz
gcc-30ba62d91ff96b0f86cc1a8544dd1ed30196ca40.tar.bz2
ada: Compiler accepts illegal assignment to reference type target.
An assignment statement whose LHS is of a reference type is never legal. If no other legality rule is violated, then it is ambiguous. In some cases this ambiguity was not correctly detected. gcc/ada/ * sem_ch5.adb (Analyze_Assignment): Delete code that was incorrectly implementing a preference rule.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/sem_ch5.adb8
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 4db3a1a..d44a12d 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -437,14 +437,6 @@ package body Sem_Ch5 is
then
null;
- -- This may be a call to a parameterless function through an
- -- implicit dereference, so discard interpretation as well.
-
- elsif Is_Entity_Name (Lhs)
- and then Has_Implicit_Dereference (It.Typ)
- then
- null;
-
elsif Has_Compatible_Type (Rhs, It.Typ) then
if T1 = Any_Type then
T1 := It.Typ;