2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/trans.c (Loop_Statement_to_gnu): Use gnat_type_for_size
+ directly to obtain an unsigned version of the base type.
+
+2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Out_Parameter>: Do not
generate the special PARM_DECL for an Out parameter in LTO mode.
{
if (TYPE_PRECISION (gnu_base_type)
> TYPE_PRECISION (size_type_node))
- gnu_base_type = gnat_unsigned_type (gnu_base_type);
+ gnu_base_type
+ = gnat_type_for_size (TYPE_PRECISION (gnu_base_type), 1);
else
gnu_base_type = size_type_node;
+2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/modular4.adb: New test.
+ * gnat.dg/modular4_pkg.ads: New helper.
+
2012-10-21 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/atomic1.ads: XFAIL on MIPS.
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with Modular4_Pkg; use Modular4_Pkg;
+
+procedure Modular4 is
+begin
+ for I in Zero .. F mod 8 loop
+ raise Program_Error;
+ end loop;
+end;
--- /dev/null
+package Modular4_Pkg is
+
+ type Word is mod 2**48;
+
+ Zero : constant Word := 0;
+
+ function F return Word;
+
+end Modular4_Pkg;