+2008-11-07 Geert Bosch <bosch@adacore.com>
+
+ * gcc-interface/trans.c (build_binary_op_trapv): Convert arguments
+ and result for call to __gnat_mulv64.
+
2008-11-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c: Fix formatting nits.
int needed_precision = precision * 2;
if (code == MULT_EXPR && precision == 64)
- return build_call_2_expr (mulv64_decl, lhs, rhs);
+ {
+ tree int_64 = gnat_type_for_size (64, 0);
+
+ return convert (gnu_type, build_call_2_expr (mulv64_decl,
+ convert (int_64, lhs),
+ convert (int_64, rhs)));
+ }
else if (needed_precision <= BITS_PER_WORD
|| (code == MULT_EXPR
+2008-11-07 Geert Bosch <bosch@adacore.com>
+
+ * gnat.dg/test_8bitlong_overflow.adb: New test.
+
2008-11-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.dg/ipa/iinline-1.C: Remove -c flag, add -fpie for PIC
--- /dev/null
+-- { dg-do run }
+-- { dg-options "-gnato" }
+
+procedure Test_8bitlong_Overflow is
+
+ pragma Unsuppress (Overflow_Check);
+ generic
+ type T is range <>;
+ package G is
+ LO : T := T'first;
+ ONE : T := T(1);
+
+ type A2 is array(T range <>) of T;
+ subtype SA2 is A2(LO..4*ONE);
+
+ ARRAY_AGGR : SA2 := SA2'(others=>LO + 1);
+
+ POS_1 : T := T'pos(LO*ONE);
+ end;
+
+ type T is new LONG_INTEGER range -1..10;
+ for T'size use 8;
+
+ package P is new G (T);
+
+begin
+ null;
+end;