+2017-12-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always take
+ into account the Esize if it is known.
+
2017-12-21 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
TYPE_ALIGN (gnu_type));
/* Likewise, if a size is specified, use it if valid. */
- if (Known_Esize (gnat_entity) && No (Address_Clause (gnat_entity)))
+ if (Known_Esize (gnat_entity))
gnu_size
= validate_size (Esize (gnat_entity), gnu_type, gnat_entity,
VAR_DECL, false, Has_Size_Clause (gnat_entity));
+2017-12-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/atomic9.adb: New test.
+
2017-12-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/80747
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-fdump-tree-gimple" }
+
+with Interfaces;
+
+procedure Atomic9 is
+
+ Register : Interfaces.Unsigned_32;
+
+ type Interrupt_ID is range 0 .. 44;
+
+ procedure Trigger_Interrupt (IRQ : Interrupt_ID) is
+ NVIC_STIR : Interrupt_ID
+ with
+ Import,
+ Atomic,
+ Size => 32,
+ Address => Register'Address;
+
+ begin
+ NVIC_STIR := IRQ;
+ end Trigger_Interrupt;
+
+begin
+ Register := 16#ffff_ffff#;
+ Trigger_Interrupt (1);
+end;
+
+-- { dg-final { scan-tree-dump "atomic_store_4" "gimple" } }