------- Comment #5 from pinskia at gcc dot gnu dot org 2006-09-13 06:56 ------- This one works for me but I doubt it is correct: Index: ../../gcc/ipa-utils.c =================================================================== --- ../../gcc/ipa-utils.c (revision 116919) +++ ../../gcc/ipa-utils.c (working copy) @@ -212,6 +212,7 @@ ipa_utils_reduced_inorder (struct cgraph tree get_base_var (tree t) { + tree temp; if ((TREE_CODE (t) == EXC_PTR_EXPR) || (TREE_CODE (t) == FILTER_EXPR)) return t;
@@ -221,7 +222,11 @@ get_base_var (tree t) && TREE_CODE (t) != FUNCTION_DECL && TREE_CODE (t) != CONST_DECL) { - t = TREE_OPERAND (t, 0); + temp = staticp (t); + if (temp) + t = temp; + else + t = TREE_OPERAND (t, 0); } return t; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29016