PR2044: reject declarations of functions returning variably modified 
types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71941 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/vla.c b/test/Sema/vla.c
index b483914..6745472 100644
--- a/test/Sema/vla.c
+++ b/test/Sema/vla.c
@@ -46,3 +46,8 @@
 
 int a[*]; // expected-error {{star modifier used outside of function prototype}}
 int f4(int a[*][*]);
+
+// PR2044
+int pr2044(int b) {int (*c(void))[b];**c() = 2;} // expected-error {{variably modified type}}
+int pr2044b;
+int (*pr2044c(void))[pr2044b]; // expected-error {{variably modified type}}