Commit 3138f224 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/55890 (calling a builtin func through a cast triggers an ICE)

	PR middle-end/55890
	* tree-ssa-ccp.c (evaluate_stmt): Use gimple_call_builtin_p.

	* gcc.dg/torture/pr55890-3.c: New test.

From-SVN: r195008
parent 5f4e6de3
2013-01-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/55890
* tree-ssa-ccp.c (evaluate_stmt): Use gimple_call_builtin_p.
PR tree-optimization/54120
* tree-vrp.c (range_fits_type_p): Don't allow
src_precision < precision from signed vr to unsigned_p
......
2013-01-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/55890
* gcc.dg/torture/pr55890-3.c: New test.
PR middle-end/55851
* gcc.c-torture/compile/pr55851.c: New test.
......
/* { dg-do compile } */
void *memmove ();
void *
bar ()
{
return memmove ();
}
/* Conditional constant propagation pass for the GNU compiler.
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012 Free Software Foundation, Inc.
2010, 2011, 2012, 2013 Free Software Foundation, Inc.
Adapted from original RTL SSA-CCP by Daniel Berlin <dberlin@dberlin.org>
Adapted to GIMPLE trees by Diego Novillo <dnovillo@redhat.com>
......@@ -1546,7 +1546,6 @@ evaluate_stmt (gimple stmt)
&& !is_constant)
{
enum gimple_code code = gimple_code (stmt);
tree fndecl;
val.lattice_val = VARYING;
val.value = NULL_TREE;
val.mask = double_int_minus_one;
......@@ -1593,10 +1592,9 @@ evaluate_stmt (gimple stmt)
|| POINTER_TYPE_P (TREE_TYPE (rhs1)))
val = bit_value_binop (code, TREE_TYPE (rhs1), rhs1, rhs2);
}
else if (code == GIMPLE_CALL
&& (fndecl = gimple_call_fndecl (stmt))
&& DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL)
else if (gimple_call_builtin_p (stmt, BUILT_IN_NORMAL))
{
tree fndecl = gimple_call_fndecl (stmt);
switch (DECL_FUNCTION_CODE (fndecl))
{
case BUILT_IN_MALLOC:
......
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