Commit 4e115102 by Marek Polacek Committed by Marek Polacek

re PR tree-optimization/57980 (gcc 4.8.1 -foptimize-sibling-calls -O1 ICE in…

re PR tree-optimization/57980 (gcc 4.8.1 -foptimize-sibling-calls -O1 ICE in build_int_cst_wide, at tree.c:1210)

PR tree-optimization/57980

Co-Authored-By: Marc Glisse <marc.glisse@inria.fr>

From-SVN: r201660
parent 1f97e193
2013-08-12 Marek Polacek <polacek@redhat.com>
Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/57980
* tree-tailcall.c (process_assignment): Call build_minus_one_cst
when creating -1 constant.
2013-08-10 Jan Hubicka <jh@suse.cz> 2013-08-10 Jan Hubicka <jh@suse.cz>
Workaround binutils PR14342. Workaround binutils PR14342.
......
2013-08-12 Marek Polacek <polacek@redhat.com>
PR tree-optimization/57980
* gcc.dg/pr57980.c: New test.
2013-08-12 Thomas Koenig <tkoenig@gcc.gnu.org> 2013-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/56666 PR fortran/56666
......
/* PR tree-optimization/57980 */
/* { dg-do compile } */
/* { dg-options "-O -foptimize-sibling-calls" } */
typedef int V __attribute__ ((vector_size (sizeof (int))));
extern V f (void);
V
bar (void)
{
return -f ();
}
V
foo (void)
{
V v = { };
return v - f ();
}
...@@ -326,11 +326,7 @@ process_assignment (gimple stmt, gimple_stmt_iterator call, tree *m, ...@@ -326,11 +326,7 @@ process_assignment (gimple stmt, gimple_stmt_iterator call, tree *m,
return true; return true;
case NEGATE_EXPR: case NEGATE_EXPR:
if (FLOAT_TYPE_P (TREE_TYPE (op0))) *m = build_minus_one_cst (TREE_TYPE (op0));
*m = build_real (TREE_TYPE (op0), dconstm1);
else
*m = build_int_cst (TREE_TYPE (op0), -1);
*ass_var = dest; *ass_var = dest;
return true; return true;
...@@ -339,11 +335,7 @@ process_assignment (gimple stmt, gimple_stmt_iterator call, tree *m, ...@@ -339,11 +335,7 @@ process_assignment (gimple stmt, gimple_stmt_iterator call, tree *m,
*a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var); *a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var);
else else
{ {
if (FLOAT_TYPE_P (TREE_TYPE (non_ass_var))) *m = build_minus_one_cst (TREE_TYPE (non_ass_var));
*m = build_real (TREE_TYPE (non_ass_var), dconstm1);
else
*m = build_int_cst (TREE_TYPE (non_ass_var), -1);
*a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var); *a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var);
} }
......
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