[Ada] Implement AI12-0077 Has_Same_Storage on objects of size zero
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 30 Mar 2020 10:38:01 +0000 (12:38 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 15 Jun 2020 08:04:19 +0000 (04:04 -0400)
commit36cf595c0b8919dc261771fc5bea0c8b5614ab60
tree05b0377f8b8f186fa478b422cc34fd85a14b95e9
parent1fab710d0694d487fbd4943cdec240f2dcfda496
[Ada] Implement AI12-0077 Has_Same_Storage on objects of size zero

2020-06-15  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_attr.adb (Expand_N_Attribute_Reference) <Has_Same_Storage>:
Do not do superfluous work.  Add the condition (X'Size /= 0) on
both paths and turn binary AND into short-circuit AND THEN.
gcc/ada/exp_attr.adb