re PR middle-end/35823 (verify_gimple fails on taking 'Size of a String subprogram parameter)
2008-04-04 Richard Guenther <rguenther@suse.de> PR middle-end/35823 * fold-const.c (optimize_minmax_comparison): Use the correct type for the constant in the simplified comparison. * gnat.dg/pr35823.adb: New testcase. From-SVN: r133893
This commit is contained in:
parent
c53a18d377
commit
c071e8bcc2
@ -1,3 +1,9 @@
|
||||
2008-04-04 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/35823
|
||||
* fold-const.c (optimize_minmax_comparison): Use the correct
|
||||
type for the constant in the simplified comparison.
|
||||
|
||||
2008-04-04 Zuxy Meng <zuxy.meng@gmail.com>
|
||||
|
||||
* config/i386/driver-i386.c (describe_cache): Add l2_sizekb argument.
|
||||
|
@ -5547,7 +5547,7 @@ optimize_minmax_comparison (enum tree_code code, tree type, tree op0, tree op1)
|
||||
{
|
||||
tree arg0 = op0;
|
||||
enum tree_code op_code;
|
||||
tree comp_const = op1;
|
||||
tree comp_const;
|
||||
tree minmax_const;
|
||||
int consts_equal, consts_lt;
|
||||
tree inner;
|
||||
@ -5556,6 +5556,7 @@ optimize_minmax_comparison (enum tree_code code, tree type, tree op0, tree op1)
|
||||
|
||||
op_code = TREE_CODE (arg0);
|
||||
minmax_const = TREE_OPERAND (arg0, 1);
|
||||
comp_const = fold_convert (TREE_TYPE (arg0), op1);
|
||||
consts_equal = tree_int_cst_equal (minmax_const, comp_const);
|
||||
consts_lt = tree_int_cst_lt (minmax_const, comp_const);
|
||||
inner = TREE_OPERAND (arg0, 0);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2008-04-04 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/35823
|
||||
* gnat.dg/pr35823.adb: New testcase.
|
||||
|
||||
2008-04-03 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
PR c/35712
|
||||
|
6
gcc/testsuite/gnat.dg/pr35823.adb
Normal file
6
gcc/testsuite/gnat.dg/pr35823.adb
Normal file
@ -0,0 +1,6 @@
|
||||
procedure pr35823 (Arg : in String) is
|
||||
Size : constant Natural := Arg'Size;
|
||||
begin
|
||||
null;
|
||||
end pr35823;
|
||||
|
Loading…
Reference in New Issue
Block a user