http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54515
--- Comment #6 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-09-07 15:23:04 UTC --- The following patch fixes the issue for me: diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index aafaa15..2bb92e9 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -984,7 +984,8 @@ static void disqualify_base_of_expr (tree t, const char *reason) { t = get_base_address (t); - if (sra_mode == SRA_MODE_EARLY_IPA + if (t + && sra_mode == SRA_MODE_EARLY_IPA && TREE_CODE (t) == MEM_REF) t = get_ssa_base_param (TREE_OPERAND (t, 0));