/* Type based alias analysis.
- Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation,
- Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010
+ Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
tree type = get_canon_type (TREE_TYPE (t), false, false);
if (!type) return;
- if (lookup_attribute ("used", DECL_ATTRIBUTES (t)))
+ if (DECL_PRESERVE_P (t))
{
mark_interesting_type (type, FULL_ESCAPE);
return;
if (TYPE_ARG_TYPES (TREE_TYPE (callee_t)))
{
for (arg_type = TYPE_ARG_TYPES (TREE_TYPE (callee_t)), i = 0;
- arg_type && TREE_VALUE (arg_type) != void_type_node;
+ arg_type && TREE_VALUE (arg_type) != void_type_node
+ && i < gimple_call_num_args (call);
arg_type = TREE_CHAIN (arg_type), i++)
{
tree operand = gimple_call_arg (call, i);
have to do this; the front ends should always process
the arg list from the TYPE_ARG_LIST. */
for (arg_type = DECL_ARGUMENTS (callee_t), i = 0;
- arg_type;
+ arg_type && i < gimple_call_num_args (call);
arg_type = TREE_CHAIN (arg_type), i++)
{
tree operand = gimple_call_arg (call, i);
they may cause a type variable to escape.
*/
for (node = cgraph_nodes; node; node = node->next)
- if (node->analyzed)
+ if (node->analyzed && !node->clone_of)
analyze_function (node);