Commit d10a61fb by Eric Botcazou

fold-const.c (round_up_loc): Cast divisor to signed on all paths before negating it.

	* fold-const.c (round_up_loc): Cast divisor to signed on all paths
	before negating it.
	* stor-layout.c (finalize_record_size): Revert latest change.

From-SVN: r221198
parent 8ed4390c
2015-03-04 Eric Botcazou <ebotcazou@adacore.com>
* fold-const.c (round_up_loc): Cast divisor to signed on all paths
before negating it.
* stor-layout.c (finalize_record_size): Revert latest change.
2015-03-04 Andreas Tobler <andreast@gcc.gnu.org>
* config/rs6000/t-freebsd64: Remove 32-bit soft-float multilibs.
......@@ -25,8 +31,8 @@
2015-03-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc/config/s390/s390.c (s390_expand_builtin): Exlude non-htm
builtins from checking for -mhtm option.
* config/s390/s390.c (s390_expand_builtin): Exlude non-htm builtins
from checking for -mhtm option.
2015-03-03 Jan Hubicka <hubicka@ucw.cz>
......
......@@ -16019,8 +16019,8 @@ round_up_loc (location_t loc, tree value, unsigned int divisor)
return value;
overflow_p = TREE_OVERFLOW (value);
val &= ~(divisor - 1);
val += divisor;
val += divisor - 1;
val &= - (int) divisor;
if (val == 0)
overflow_p = true;
......@@ -16032,7 +16032,7 @@ round_up_loc (location_t loc, tree value, unsigned int divisor)
t = build_int_cst (TREE_TYPE (value), divisor - 1);
value = size_binop_loc (loc, PLUS_EXPR, value, t);
t = build_int_cst (TREE_TYPE (value), - (HOST_WIDE_INT) divisor);
t = build_int_cst (TREE_TYPE (value), - (int) divisor);
value = size_binop_loc (loc, BIT_AND_EXPR, value, t);
}
}
......
......@@ -1627,11 +1627,6 @@ finalize_record_size (record_layout_info rli)
unpadded_size_unit
= size_binop (PLUS_EXPR, unpadded_size_unit, size_one_node);
if (TREE_CODE (unpadded_size_unit) == INTEGER_CST
&& !TREE_OVERFLOW (unpadded_size_unit)
&& !valid_constant_size_p (unpadded_size_unit))
error ("type %qT is too large", rli->t);
/* Round the size up to be a multiple of the required alignment. */
TYPE_SIZE (rli->t) = round_up (unpadded_size, TYPE_ALIGN (rli->t));
TYPE_SIZE_UNIT (rli->t)
......
2015-03-04 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/entry_queues3.adb: New test.
2015-03-04 Ian Lance Taylor <iant@google.com>
* go.test/go-test.exp (go-gc-tests): Skip nilptr test on s390*.
......
-- { dg-do compile }
procedure Entry_Queues3 is
generic
type Large_Range is range <>;
package Queue is
end;
package body Queue is
task T is
entry E(Large_Range);
end T ;
task body T is
begin
accept E(Large_Range'First) do
null;
end e ;
end T ;
end Queue;
type Large_Range is range 0 .. Long_Integer'Last;
package My_Queue is new Queue(Large_Range); -- { dg-warning "warning" }
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