Index: gcc.target/arm/ftest-support.h
===================================================================
--- gcc.target/arm/ftest-support.h	(revision 194619)
+++ gcc.target/arm/ftest-support.h	(working copy)
@@ -1,84 +1,156 @@
-#if 0
-#define INTERNAL_DEBUG 1
+/* For each of several ARM architecture features, check that relevant
+   macros are defined or not, and that they have the expected values.  */
+
+#ifdef NEED_ARM_ARCH
+# ifdef __ARM_ARCH
+#  if __ARM_ARCH != VALUE_ARM_ARCH
+#   error __ARM_ARCH has unexpected value
+#  endif
+# else
+#  error __ARM_ARCH is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH
+#  error __ARM_ARCH is defined but should not be
+# endif
 #endif
 
-#ifdef INTERNAL_DEBUG
-#include <stdio.h>
+#ifdef NEED_ARM_ARCH_ISA_ARM
+# ifdef __ARM_ARCH_ISA_ARM
+#  if __ARM_ARCH_ISA_ARM != VALUE_ARM_ARCH_ISA_ARM
+#   error __ARM_ARCH_ISA_ARM has unexpected value
+#  endif
+# else
+#  error __ARM_ARCH_ISA_ARM is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_ISA_ARM
+#  error __ARM_ARCH_ISA_ARM is defined but should not be
+# endif
 #endif
 
-extern void abort (void);
+#ifdef NEED_ARM_ARCH_ISA_THUMB
+# ifdef __ARM_ARCH_ISA_THUMB
+#  if __ARM_ARCH_ISA_THUMB != VALUE_ARM_ARCH_ISA_THUMB
+#   error __ARM_ARCH_ISA_THUMB has unexpected value
+#  endif
+# else
+#  error __ARM_ARCH_ISA_THUMB is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_ISA_THUMB
+#  error __ARM_ARCH_ISA_THUMB is defined but should not be
+# endif
+#endif
 
-enum architecture {
-  ARCH_V4 = 0,
-  ARCH_V4T,
-  ARCH_V5T,
-  ARCH_V5TE,
-  ARCH_V6,
-  ARCH_V6K,
-  ARCH_V6T2,
-  ARCH_V6Z,
-  ARCH_V6M,
-  ARCH_V7A,
-  ARCH_V7R,
-  ARCH_V7M,
-  ARCH_V7EM,
-  ARCH_V8A,
-  ARCH_COUNT
-};
+#ifdef NEED_ARM_ARCH_PROFILE
+# ifdef __ARM_ARCH_PROFILE
+#  if __ARM_ARCH_PROFILE != VALUE_ARM_ARCH_PROFILE
+#   error __ARM_ARCH_PROFILE has unexpected value
+#  endif
+# else
+#  error __ARM_ARCH_PROFILE is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_PROFILE
+#  error __ARM_ARCH_PROFILE is defined but should not be
+# endif
+#endif
 
-#define NUM_FEATURES 11
-int feature_matrix[ARCH_COUNT][NUM_FEATURES];
+#ifdef NEED_ARM_FEATURE_UNALIGNED
+# ifdef __ARM_FEATURE_UNALIGNED
+#  if __ARM_FEATURE_UNALIGNED != VALUE_ARM_FEATURE_UNALIGNED
+#   error __ARM_FEATURE_UNALIGNED has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_UNALIGNED is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_UNALIGNED
+#  error __ARM_FEATURE_UNALIGNED is defined but should not be
+# endif
+#endif
 
-int
-ftest (int arch)
-{
-  int features[NUM_FEATURES] = {0};
-  int y;
+#ifdef NEED_ARM_FEATURE_LDREX
+# ifdef __ARM_FEATURE_LDREX
+#  if __ARM_FEATURE_LDREX != VALUE_ARM_FEATURE_LDREX
+#   error __ARM_FEATURE_LDREX has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_LDREX is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_LDREX
+#  error __ARM_FEATURE_LDREX is defined but should not be
+# endif
+#endif
 
-  for (y = 0; y < NUM_FEATURES; ++y)
-    features[y] = 0;
+#ifdef NEED_ARM_FEATURE_CLZ
+# ifdef __ARM_FEATURE_CLZ
+#  if __ARM_FEATURE_CLZ != VALUE_ARM_FEATURE_CLZ
+#   error __ARM_FEATURE_CLZ has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_CLZ is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_CLZ
+#  error __ARM_FEATURE_CLZ is defined but should not be
+# endif
+#endif
 
-#ifdef __ARM_ARCH
-  features[0] = __ARM_ARCH;
+#ifdef NEED_ARM_FEATURE_DSP
+# ifdef __ARM_FEATURE_DSP
+#  if __ARM_FEATURE_DSP != VALUE_ARM_FEATURE_DSP
+#   error __ARM_FEATURE_DSP has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_DSP is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_DSP
+#  error __ARM_FEATURE_DSP is defined but should not be
+# endif
 #endif
-#ifdef __ARM_ARCH_ISA_ARM
-  features[1] = __ARM_ARCH_ISA_ARM;
+
+#ifdef NEED_ARM_FEATURE_SIMD32
+# ifdef __ARM_FEATURE_SIMD32
+#  if __ARM_FEATURE_SIMD32 != VALUE_ARM_FEATURE_SIMD32
+#   error __ARM_FEATURE_SIMD32 has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_SIMD32 is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_SIMD32
+#  error __ARM_FEATURE_SIMD32 is defined but should not be
+# endif
 #endif
-#ifdef __ARM_ARCH_ISA_THUMB
-  features[2] = __ARM_ARCH_ISA_THUMB;
+
+#ifdef NEED_ARM_FEATURE_QBIT
+# ifdef __ARM_FEATURE_QBIT
+#  if __ARM_FEATURE_QBIT != VALUE_ARM_FEATURE_QBIT
+#   error __ARM_FEATURE_QBIT has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_QBIT is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_QBIT
+#  error __ARM_FEATURE_QBIT is defined but should not be
+# endif
 #endif
-#ifdef __ARM_ARCH_PROFILE
-  features[3] = __ARM_ARCH_PROFILE;
+
+#ifdef NEED_ARM_FEATURE_SAT
+# ifdef __ARM_FEATURE_SAT
+#  if __ARM_FEATURE_SAT != VALUE_ARM_FEATURE_SAT
+#   error __ARM_FEATURE_SAT has unexpected value
+#  endif
+# else
+#  error __ARM_FEATURE_SAT is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_SAT
+#  error __ARM_FEATURE_SAT is defined but should not be
+# endif
 #endif
-#ifdef __ARM_FEATURE_UNALIGNED
-  features[4] = __ARM_FEATURE_UNALIGNED;
-#endif
-#ifdef __ARM_FEATURE_LDREX
-  features[5] = __ARM_FEATURE_LDREX;
-#endif
-#ifdef __ARM_FEATURE_CLZ
-  features[6] = __ARM_FEATURE_CLZ;
-#endif
-#ifdef __ARM_FEATURE_DSP
-  features[7] = __ARM_FEATURE_DSP;
-#endif
-#ifdef __ARM_FEATURE_SIMD32
-  features[8] = __ARM_FEATURE_SIMD32;
-#endif
-#ifdef __ARM_FEATURE_QBIT
-  features[9] = __ARM_FEATURE_QBIT;
-#endif
-#ifdef __ARM_FEATURE_SAT
-  features[10] = __ARM_FEATURE_SAT;
-#endif
-  for (y = 0; y < NUM_FEATURES; ++y)
-    if (feature_matrix[arch][y] != features[y])
-      {
-#ifdef INTERNAL_DEBUG
-	printf ("%d, %d, %d, %d\n", arch, y, feature_matrix[arch][y], features[y]);
-#endif
-        abort ();
-      }
-  return 0;
-}
-
Index: gcc.target/arm/ftest-armv4-arm.c
===================================================================
--- gcc.target/arm/ftest-armv4-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv4-arm.c	(working copy)
@@ -1,14 +1,14 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v4_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v4 } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
 
-int
-main (void)
-{
-  return ftest (ARCH_V4);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#include "ftest-support.h"
+
+
Index: gcc.target/arm/ftest-armv4t-arm.c
===================================================================
--- gcc.target/arm/ftest-armv4t-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv4t-arm.c	(working copy)
@@ -1,14 +1,15 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v4t_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v4t } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
 
-int
-main (void)
-{
-  return ftest (ARCH_V4T);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv4t-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv4t-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv4t-thumb.c	(working copy)
@@ -1,14 +1,16 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v4t_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v4t } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
 
-int
-main (void)
-{
-  return ftest (ARCH_V4T);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv5t-arm.c
===================================================================
--- gcc.target/arm/ftest-armv5t-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv5t-arm.c	(working copy)
@@ -1,14 +1,18 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v5t_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v5t } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
 
-int
-main (void)
-{
-  return ftest (ARCH_V5T);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv5t-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv5t-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv5t-thumb.c	(working copy)
@@ -1,14 +1,16 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v5t_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v5t } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
 
-int
-main (void)
-{
-  return ftest (ARCH_V5T);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv5te-arm.c
===================================================================
--- gcc.target/arm/ftest-armv5te-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv5te-arm.c	(working copy)
@@ -1,14 +1,24 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v5te_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v5te } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
 
-int
-main (void)
-{
-  return ftest (ARCH_V5TE);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv5te-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv5te-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv5te-thumb.c	(working copy)
@@ -1,14 +1,16 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v5te_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v5te } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
 
-int
-main (void)
-{
-  return ftest (ARCH_V5TE);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6-arm.c
===================================================================
--- gcc.target/arm/ftest-armv6-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6-arm.c	(working copy)
@@ -1,14 +1,36 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v6_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6 } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6-thumb.c	(working copy)
@@ -1,14 +1,19 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6 } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6k-arm.c
===================================================================
--- gcc.target/arm/ftest-armv6k-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6k-arm.c	(working copy)
@@ -1,14 +1,36 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v6k_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6k } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6K);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6k-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6k-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6k-thumb.c	(working copy)
@@ -1,14 +1,19 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6k_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6k } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6K);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6m-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6m-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6m-thumb.c	(working copy)
@@ -1,14 +1,16 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6m_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6m } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6M);
-}
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
 
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6t2-arm.c
===================================================================
--- gcc.target/arm/ftest-armv6t2-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6t2-arm.c	(working copy)
@@ -1,14 +1,36 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v6t2_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6t2 } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6T2);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6t2-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6t2-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6t2-thumb.c	(working copy)
@@ -1,14 +1,34 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6t2_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6t2 } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6T2);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6z-arm.c
===================================================================
--- gcc.target/arm/ftest-armv6z-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6z-arm.c	(working copy)
@@ -1,14 +1,36 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v6z_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v6z } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6Z);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv6z-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv6z-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv6z-thumb.c	(working copy)
@@ -1,14 +1,19 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v6z_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v6z } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
 
-int
-main (void)
-{
-  return ftest (ARCH_V6Z);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7a-arm.c
===================================================================
--- gcc.target/arm/ftest-armv7a-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv7a-arm.c	(working copy)
@@ -1,14 +1,39 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v7a_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v7a } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7A);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7a-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv7a-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv7a-thumb.c	(working copy)
@@ -1,14 +1,40 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v7a_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7a } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7A);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7em-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv7em-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv7em-thumb.c	(working copy)
@@ -1,14 +1,37 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v7em_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7em } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7EM);
-}
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
 
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 7
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7m-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv7m-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv7m-thumb.c	(working copy)
@@ -1,14 +1,31 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v7m_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7m } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7M);
-}
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
 
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 7
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7r-arm.c
===================================================================
--- gcc.target/arm/ftest-armv7r-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv7r-arm.c	(working copy)
@@ -1,14 +1,39 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v7r_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v7r } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7R);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'R'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv7r-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv7r-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv7r-thumb.c	(working copy)
@@ -1,14 +1,40 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v7r_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v7r } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
 
-int
-main (void)
-{
-  return ftest (ARCH_V7R);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'R'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv8a-arm.c
===================================================================
--- gcc.target/arm/ftest-armv8a-arm.c	(revision 194619)
+++ gcc.target/arm/ftest-armv8a-arm.c	(working copy)
@@ -1,14 +1,39 @@
-/* { dg-do run } */
-/* { dg-require-effective-target arm_nothumb } */
-/* { dg-require-effective-target arm_arch_v8a_multilib } */
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-mthumb" } { "" } } */
 /* { dg-options "-marm" } */
 /* { dg-add-options arm_arch_v8a } */
 
-#include "ftest-support-arm.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 8
 
-int
-main (void)
-{
-  return ftest (ARCH_V8A);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
Index: gcc.target/arm/ftest-armv8a-thumb.c
===================================================================
--- gcc.target/arm/ftest-armv8a-thumb.c	(revision 194619)
+++ gcc.target/arm/ftest-armv8a-thumb.c	(working copy)
@@ -1,14 +1,40 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-require-effective-target arm_eabi } */
-/* { dg-require-effective-target arm_arch_v8a_multilib } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" "-marm" } { "" } } */
 /* { dg-options "-mthumb" } */
 /* { dg-add-options arm_arch_v8a } */
 
-#include "ftest-support-thumb.h"
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 8
 
-int
-main (void)
-{
-  return ftest (ARCH_V8A);
-}
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
 
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
