mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-31 12:51:15 +08:00
[Ada] Do not generate extra copies inside initialization procedures
gcc/ada/ * exp_ch6.adb (Requires_Atomic_Or_Volatile_Copy): Return false inside an initialization procedure.
This commit is contained in:
parent
fbaadba246
commit
ae6fec84da
@ -2196,6 +2196,13 @@ package body Exp_Ch6 is
|
||||
return False;
|
||||
end if;
|
||||
|
||||
-- There is no requirement inside initialization procedures and this
|
||||
-- would generate copies for atomic or volatile composite components.
|
||||
|
||||
if Inside_Init_Proc then
|
||||
return False;
|
||||
end if;
|
||||
|
||||
-- Check for atomicity mismatch
|
||||
|
||||
if Is_Atomic_Object (Actual) and then not Is_Atomic (E_Formal)
|
||||
|
Loading…
x
Reference in New Issue
Block a user