diff --git a/test/Parser/cxx-default-args.cpp b/test/Parser/cxx-default-args.cpp
index 36abf0d8cb381fd186c4660974444eb4fc9780ca..f0e2e69b44d06f75522a1c9ebc4accd7ca3ae474 100644
--- a/test/Parser/cxx-default-args.cpp
+++ b/test/Parser/cxx-default-args.cpp
@@ -31,3 +31,8 @@ struct T {
   void f7(bool a = T1<int, bool>::V < 3);
   void f8(int = func<0,1<2>(0), int = 1<0, T1<int,int>(int) = 0);
 };
+
+// rdar://18508589
+struct S { 
+  void f(int &r = error);  // expected-error {{use of undeclared identifier 'error'}}
+};