https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78860
--- Comment #3 from niva at niisi dot msk.ru --- In trunk, git://gcc.gnu.org/git/gcc.git, the problem disappears after commit 76825907d9b0e20cbb572d0d70248a4ed332fb29 But the changes in that commit are not applicable to gcc-4.7.4 which we are actually using. In gcc-4.7.4 I've fixed the problem with the following patch: diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 1d72a05..e59d173 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -3030,3 +3030,7 @@ extern GTY(()) struct target_globals *mips16_globals; with arguments ARGS. */ #define PMODE_INSN(NAME, ARGS) \ (Pmode == SImode ? NAME ## _si ARGS : NAME ## _di ARGS) + +/* This macro is introduced for fixing the gcc-4.7.4 #25 bug */ +#define TARGET_VECTOR_ADDRESSABLE 1 + diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 08f908f..82b607f 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1887,7 +1887,9 @@ maybe_optimize_var (tree var, bitmap addresses_taken, bitmap not_reg_needs) a non-register. Otherwise we are confused and forget to add virtual operands for it. */ && (!is_gimple_reg_type (TREE_TYPE (var)) +#ifndef TARGET_VECTOR_ADDRESSABLE || TREE_CODE (TREE_TYPE (var)) == VECTOR_TYPE +#endif || TREE_CODE (TREE_TYPE (var)) == COMPLEX_TYPE || !bitmap_bit_p (not_reg_needs, DECL_UID (var)))) { I think this not a very accurate solution. However it seems to work.