As noted in this message: http://gcc.gnu.org/ml/gcc/2007-02/msg0021.html gcc.dg/tree-ssa/20030714-1.c started failing on sparc with -fPIC between 2006-06-18 and 2006-06-22. The patch that caused this seems to be: 2006-06-21 Richard Guenther PR tree-optimization/27781 * Makefile.in (ipa-pure-const.o): Add $(TARGET_H) dependency. * ipa-pure-const.c (target.h): Include. (analyze_function): Do not analyze functions that do not bind locally. Not that the patch is wrong, mind you, but the optimizations necessary to satisfy the dg-final directives in the testcase apparently only activate when the function binds locally. (The function must be marked as pure by ipa-pure-const, which this patch inhibits.) I certainly don't pretend to understand the IPA code or the sequence of optimizations that's desired here, but the attached tweak to the testcase seems to get things working with -fPIC again. Tested on i586-wrs-vxworks with and without -fPIC with no regressions. OK to commit? -Nathan gcc/testsuite/ 2007-07-26 Nathan Froyd * gcc.dg/tree-ssa/20030714-1.c (find_base_value): Declare as static so appropriate optimizations kick in. (find_base_value_wrapper): New function.