public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-7900] Fix wrong assignment of aggregate to full-access component
@ 2021-03-29 22:45 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-03-29 22:45 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:471babd88668dbe4f9ff4dba6d2036ecef09653b

commit r11-7900-g471babd88668dbe4f9ff4dba6d2036ecef09653b
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Tue Mar 30 00:41:46 2021 +0200

    Fix wrong assignment of aggregate to full-access component
    
    This is a regression present on the mainline: the compiler (front-end) fails
    to assign an aggregate to a full-access component (i.e. Atomic or VFA) as a
    whole if the type of the component is not full access itself.
    
    gcc/ada/
            PR ada/99802
            * freeze.adb (Is_Full_Access_Aggregate): Call Is_Full_Access_Object
            on the name of an N_Assignment_Statement to spot full access.

Diff:
---
 gcc/ada/freeze.adb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 8dc8a222396..da14af9b8bd 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -1754,8 +1754,7 @@ package body Freeze is
             Typ := Etype (Name (Par));
 
             if not Is_Full_Access (Typ)
-              and then not (Is_Entity_Name (Name (Par))
-                             and then Is_Full_Access (Entity (Name (Par))))
+              and then not Is_Full_Access_Object (Name (Par))
             then
                return False;
             end if;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-29 22:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 22:45 [gcc r11-7900] Fix wrong assignment of aggregate to full-access component Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).