OSDN Git Service

2010-04-30 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Apr 2010 18:52:44 +0000 (18:52 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:37:29 +0000 (14:37 +0900)
PR tree-optimization/43879
* tree-ssa-structalias.c (type_could_have_pointers): Functions
can have pointers.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158945 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-structalias.c

index e370a9f..4d7ece9 100644 (file)
@@ -1,11 +1,19 @@
+2010-04-30  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/43879
+       * tree-ssa-structalias.c (type_could_have_pointers): Functions
+       can have pointers.
+
 2010-04-30  Jan Hubicka  <jh@suse.cz>
 
 2010-04-30  Jan Hubicka  <jh@suse.cz>
 
-       * lto-symtab.c (lto_symtab_resolve_can_prevail_p): Chose var with varpool.
+       * lto-symtab.c (lto_symtab_resolve_can_prevail_p): Chose var with
+       varpool.
        (lto_symtab_merge_decls_1): Remove logic looking for an initializer.
 
 2010-04-30  Jan Hubicka  <jh@suse.cz>
 
        (lto_symtab_merge_decls_1): Remove logic looking for an initializer.
 
 2010-04-30  Jan Hubicka  <jh@suse.cz>
 
-       * cgraph.h (cgraph_node_set_nonempty_p, varpool_node_set_nonempty_p): New.
+       * cgraph.h (cgraph_node_set_nonempty_p, varpool_node_set_nonempty_p):
+       New.
        * lto-cgraph.c (input_cgraph): Remove call to lto_mark_file_for_ltrans.
        * lto-streamer.h (lto_file_decl_data): Remove needs_ltrans_p.
        (lto_file_needs_ltrans_p, lto_mark_file_for_ltrans,
        * lto-cgraph.c (input_cgraph): Remove call to lto_mark_file_for_ltrans.
        * lto-streamer.h (lto_file_decl_data): Remove needs_ltrans_p.
        (lto_file_needs_ltrans_p, lto_mark_file_for_ltrans,
index 28bb0bb..fce39de 100644 (file)
@@ -2940,6 +2940,12 @@ type_could_have_pointers (tree type)
   if (TREE_CODE (type) == ARRAY_TYPE)
     return type_could_have_pointers (TREE_TYPE (type));
 
   if (TREE_CODE (type) == ARRAY_TYPE)
     return type_could_have_pointers (TREE_TYPE (type));
 
+  /* A function or method can consume pointers.
+     ???  We could be more precise here.  */
+  if (TREE_CODE (type) == FUNCTION_TYPE
+      || TREE_CODE (type) == METHOD_TYPE)
+    return true;
+
   return AGGREGATE_TYPE_P (type);
 }
 
   return AGGREGATE_TYPE_P (type);
 }