From 4a0c473d52dfe48a2211322801a6aab71a20ab6f Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 25 Jul 2008 16:49:36 +0100 Subject: [PATCH] target-supports.exp (check_effective_target_arm_thumb1_ok): New. * lib/target-supports.exp (check_effective_target_arm_thumb1_ok): New. * g++.dg/inherit/thunk8.C: Use it. From-SVN: r138143 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/inherit/thunk8.C | 2 +- gcc/testsuite/lib/target-supports.exp | 11 +++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 020502ce3a5..85ac795ca91 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-07-25 Joseph Myers + + * lib/target-supports.exp (check_effective_target_arm_thumb1_ok): + New. + * g++.dg/inherit/thunk8.C: Use it. + 2008-07-24 Jan Hubicka * gcc.dg/winline-4.c: Remove. diff --git a/gcc/testsuite/g++.dg/inherit/thunk8.C b/gcc/testsuite/g++.dg/inherit/thunk8.C index f7761349f8e..ef645356898 100644 --- a/gcc/testsuite/g++.dg/inherit/thunk8.C +++ b/gcc/testsuite/g++.dg/inherit/thunk8.C @@ -3,7 +3,7 @@ Make sure that won't happen anymore. */ /* { dg-do compile } */ -/* { dg-require-effective-target arm32 } */ +/* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-options "-mthumb -fPIC" } */ struct A { diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 66231c669b0..5f426669265 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1249,6 +1249,17 @@ proc check_effective_target_arm_neon_ok { } { } } +# Return 1 is this is an ARM target where -mthumb causes Thumb-1 to be +# used. + +proc check_effective_target_arm_thumb1_ok { } { + return [check_no_compiler_messages arm_thumb1_ok assembly { + #if !defined(__arm__) || !defined(__thumb__) || defined(__thumb2__) + #error FOO + #endif + } "-mthumb"] +} + # Return 1 if the target supports executing NEON instructions, 0 # otherwise. Cache the result. -- 2.30.2