diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc
index f39dc71d59324dd9cb196cd3f05641514972e3d7..f7ce13ae738034a245105855a02046a7bd0e55cf 100644
--- a/gcc/c/c-typeck.cc
+++ b/gcc/c/c-typeck.cc
@@ -3367,7 +3367,7 @@ convert_argument (location_t ploc, tree function, tree fundecl,
     {
       error_at (ploc, "type of formal parameter %d is incomplete",
 		parmnum + 1);
-      return val;
+      return error_mark_node;
     }
 
   /* Optionally warn about conversions that differ from the default
diff --git a/gcc/testsuite/gcc.dg/pr100532-1.c b/gcc/testsuite/gcc.dg/pr100532-1.c
new file mode 100644
index 0000000000000000000000000000000000000000..81e37c60415cf51fffde022a8e41e56ede4714a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr100532-1.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* PR c/100532 */
+
+typedef __SIZE_TYPE__ size_t;
+void *memcpy(void[], const void *, size_t); /* { dg-error "declaration of type name" } */
+void c(void) { memcpy(c, "a", 2); } /* { dg-error "type of formal parameter" } */
+