[Ada] Cleanup condition for an effectively volatile array type
Pierre-Marie de Rodat
derodat@adacore.com
Wed Jul 15 13:45:18 GMT 2020
When we detect effectively volatile array type we only need to examine
the type of array component if the array itself has no
Has_Volatile_Components property.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Atomic_Components): Simplify with Ekind_In.
(Complex_Representation): Fix type of E_Id, which just like when
for pragma Atomic_Components will hold an N_Identifier node, not
an entity.
* sem_util.adb (Is_Effectively_Volatile): Refactor to avoid
unnecessary computation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2528 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200715/afe9332e/attachment-0001.bin>
More information about the Gcc-patches
mailing list