--- configure	2013-08-10 15:22:39.940547257 +0200
+++ configure.new	2013-08-10 15:29:25.030482936 +0200
@@ -12598,6 +12598,32 @@
 if test $ac_cv_cflags__fno_builtin = yes; then :
   BUILTINFLAG="-fno-builtin"
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-tree-loop-distribute-patterns" >&5
+$as_echo_n "checking whether the compiler supports -fno-tree-loop-distribute-patterns... " >&6; }
+if ${ac_cv_cflags__fno_tree_loop_distribute_patterns+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_wine_try_cflags_saved=$CFLAGS
+CFLAGS="$CFLAGS -fno-tree-loop-distribute-patterns"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(int argc, char **argv) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_cflags__fno_tree_loop_distribute_patterns=yes
+else
+  ac_cv_cflags__fno_tree_loop_distribute_patterns=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+CFLAGS=$ac_wine_try_cflags_saved
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__fno_tree_loop_distribute_patterns" >&5
+$as_echo "$ac_cv_cflags__fno_tree_loop_distribute_patterns" >&6; }
+if test $ac_cv_cflags__fno_tree_loop_distribute_patterns = yes; then :
+  EXTRACFLAGS="$EXTRACFLAGS -fno-tree-loop-distribute-patterns"
+fi
+
 fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-strict-aliasing" >&5
 $as_echo_n "checking whether the compiler supports -fno-strict-aliasing... " >&6; }
--- configure.ac	2013-08-10 15:22:39.942547232 +0200
+++ configure.ac.new	2013-08-10 15:31:05.626225316 +0200
@@ -1804,6 +1804,7 @@
 
   dnl Check for some compiler flags
   WINE_TRY_CFLAGS([-fno-builtin],[AC_SUBST(BUILTINFLAG,"-fno-builtin")])
+  WINE_TRY_CFLAGS([-fno-tree-loop-distribute-patterns])
   WINE_TRY_CFLAGS([-fno-strict-aliasing])
   dnl clang needs to be told to fail on unknown options
   saved_CFLAGS=$CFLAGS