Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 186169)
+++ config/i386/i386.c	(working copy)
@@ -11510,7 +11510,7 @@ ix86_decompose_address (rtx addr, struct ix86_addr
 	    addr = SUBREG_REG (addr);
 	  else if (GET_MODE (addr) == DImode)
 	    addr = gen_rtx_SUBREG (SImode, addr, 0);
-	  else
+	  else if (GET_MODE (addr) != VOIDmode)
 	    return 0;
 	}
     }
Index: testsuite/gcc.target/i386/pr52882.c
===================================================================
--- testsuite/gcc.target/i386/pr52882.c	(revision 0)
+++ testsuite/gcc.target/i386/pr52882.c	(revision 0)
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+struct S1 {
+  int f0;
+  int f1;
+};
+
+int fn1 ();
+void fn2 (struct S1);
+
+void
+fn3 () {
+  struct S1 a = { 1, 0 };
+  if (fn1 ())
+    fn2 (a);
+  for (; a.f1;) {
+  }
+}
