mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-15 17:01:01 +08:00
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
This commit is contained in:
parent
5f4e6de31f
commit
3138f2246b
gcc
@ -1,5 +1,8 @@
|
||||
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
|
||||
|
@ -1,5 +1,8 @@
|
||||
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.
|
||||
|
||||
|
9
gcc/testsuite/gcc.dg/torture/pr55890-3.c
Normal file
9
gcc/testsuite/gcc.dg/torture/pr55890-3.c
Normal file
@ -0,0 +1,9 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
void *memmove ();
|
||||
|
||||
void *
|
||||
bar ()
|
||||
{
|
||||
return memmove ();
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/* 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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user