Test gcc.target/arm/mla-1.c scans the assembly file for a string that is part of the name, which always succeeds. This patch adds a tab to the search target to avoid that. It also removes the -march option and pruning of warnings about conflicts, and restricts the tests to targets that support Thumb-2, with support for new effective target arm_thumb2. Changes to the comment for arm_thumb1 support clarify the difference between it and arm_thumb1_ok.
OK for trunk, and for 4.6 in a few days if no problems?
2011-07-06 Janis Johnson <jani...@codesourcery.com> * lib/target-supports.exp (check_effective_target_arm_thumb1): New. (check_effective_target_arm_thumb2): Clarify comment, add valid code. * gcc.target/arm/mla-1.c: Skip for arm_thumb1, don't specify -march, add tab to scan target. Index: lib/target-supports.exp =================================================================== --- lib/target-supports.exp (revision 175921) +++ lib/target-supports.exp (working copy) @@ -2027,13 +2039,27 @@ } "-mthumb"] } -# Return 1 is this is an ARM target where is Thumb-2 used. +# Return 1 if this is an ARM target where Thumb-1 is used without options +# added by the test. +proc check_effective_target_arm_thumb1 { } { + return [check_no_compiler_messages arm_thumb1 assembly { + #if !defined(__arm__) || !defined(__thumb__) || defined(__thumb2__) + #error not thumb1 + #endif + int i; + } ""] +} + +# Return 1 if this is an ARM target where Thumb-2 is used without options +# added by the test. + proc check_effective_target_arm_thumb2 { } { return [check_no_compiler_messages arm_thumb2 assembly { #if !defined(__thumb2__) #error FOO #endif + int i; } ""] } Index: gcc.target/arm/mla-1.c =================================================================== --- gcc.target/arm/mla-1.c (revision 175921) +++ gcc.target/arm/mla-1.c (working copy) @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv5te" } */ -/* { dg-prune-output "switch .* conflicts with" } */ +/* { dg-skip-if "" { arm_thumb1 } { "*" } { "" } } */ +/* { dg-options "-O2" } */ int @@ -19,4 +19,4 @@ return accum; } -/* { dg-final { scan-assembler "mla" } } */ +/* { dg-final { scan-assembler "mla\\t" } } */