This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix another bit of PR43879
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Apr 2010 20:50:16 +0200 (CEST)
- Subject: [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);
}