Index: lib/Sema/SemaDeclAttr.cpp
===================================================================
--- lib/Sema/SemaDeclAttr.cpp
+++ lib/Sema/SemaDeclAttr.cpp
@@ -6505,5 +6505,5 @@
         DeclVersion = AA->getIntroduced();
   }
 
-  return DeclVersion;
+  return std::max(DeclVersion, Context.getTargetInfo().getPlatformMinVersion());
 }
Index: test/SemaObjC/attr-availability.m
===================================================================
--- test/SemaObjC/attr-availability.m
+++ test/SemaObjC/attr-availability.m
@@ -297,6 +297,7 @@
 
 #if defined(WARN_PARTIAL)
 
+int fn_10_0() __attribute__((availability(macosx, introduced=10.0)));
 int fn_10_7() __attribute__((availability(macosx, introduced=10.7))); // expected-note{{marked partial here}}
 int fn_10_8() __attribute__((availability(macosx, introduced=10.8))) { // expected-note{{marked partial here}}
   return fn_10_7();
@@ -324,4 +325,8 @@
 -(void)method4 { fn_10_8(); }
 @end
 
+int old_func() __attribute__((availability(macos, introduced=10.4))) {
+  fn_10_0();
+}
+
 #endif