This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix another bit of PR43879


This fixes miscompiles in gfortran.dg with -fipa-pta.  The issue
was that we mishandled indirect calls to external functions
(which was fixed by -fwhole-file because they started to get
resolved locally which works fine).

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied
to trunk.

Richard.

2010-04-30  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43879
	* tree-ssa-structalias.c (type_could_have_pointers): Functions
	can have pointers.

Index: gcc/tree-ssa-structalias.c
===================================================================
*** gcc/tree-ssa-structalias.c	(revision 158939)
--- gcc/tree-ssa-structalias.c	(working copy)
*************** type_could_have_pointers (tree type)
*** 2940,2945 ****
--- 2940,2951 ----
    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);
  }
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]