Commit 58e94443 by Geert Bosch Committed by Eric Botcazou

trans.c (build_binary_op_trapv): Convert arguments and result for call to __gnat_mulv64.

	* gcc-interface/trans.c (build_binary_op_trapv): Convert arguments
	and result for call to __gnat_mulv64.

From-SVN: r141668
parent a7c43bbc
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.
......@@ -6032,7 +6032,13 @@ build_binary_op_trapv (enum tree_code code, tree gnu_type, tree left,
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
......
-- { 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment