From f6133444905c846e6ea0bcb76430ce077ba6fcd1 Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Mon, 12 Oct 2020 15:01:20 +0100
Subject: [PATCH] testsuite, Darwin, Arm64 : Skip tests with an unsupported
 API.

The "OBJC_OLD_DISPATCH_PROTOTYPES" workaround is explicitly
disabled for arm64 in the system headers.

(cherry picked from commit 478ed35ca6797f4465aef158f46194b9facb96d9)
Signed-off-by: Kirill A. Korinsky <kirill@korins.ky>
---
 gcc/testsuite/objc.dg/gnu-api-2-class-meta.m | 1 +
 gcc/testsuite/objc.dg/gnu-api-2-class.m      | 1 +
 2 files changed, 2 insertions(+)

diff --git gcc/testsuite/objc.dg/gnu-api-2-class-meta.m gcc/testsuite/objc.dg/gnu-api-2-class-meta.m
index 3a85b163c91..3e3abd11ac9 100644
--- gcc/testsuite/objc.dg/gnu-api-2-class-meta.m
+++ gcc/testsuite/objc.dg/gnu-api-2-class-meta.m
@@ -19,6 +19,7 @@
 
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
+/* { dg-skip-if "API unsupported" { arm64*-*-darwin* aarch64*-*-darwin* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 /* { dg-additional-options "-DOBJC_OLD_DISPATCH_PROTOTYPES" { target { *-*-darwin* } } } */
 
diff --git gcc/testsuite/objc.dg/gnu-api-2-class.m gcc/testsuite/objc.dg/gnu-api-2-class.m
index eade0dcbbfa..3f41dc141cd 100644
--- gcc/testsuite/objc.dg/gnu-api-2-class.m
+++ gcc/testsuite/objc.dg/gnu-api-2-class.m
@@ -6,6 +6,7 @@
 
 /* { dg-do run } */
 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
+/* { dg-skip-if "API unsupported" { arm64*-*-darwin* aarch64*-*-darwin* } { "-fnext-runtime" } { "" } } */
 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
 /* { dg-additional-options "-DOBJC_OLD_DISPATCH_PROTOTYPES" { target { *-*-darwin* } } } */
 
-- 
2.42.1

