Message ID | CAKdteObLoHHfMzzrPz4qOfHp+OJC25wQgJyZmX3txTQhconu9Q@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 22 March 2016 at 13:14, Bernd Schmidt <bschmidt@redhat.com> wrote: > On 03/22/2016 10:24 AM, Christophe Lyon wrote: >> >> >> The ARM test isn't sufficiently protected against non-compliant >> configurations, >> and fails if GCC is configured for arm*linux-gnueabihf for instance >> (see >> http://people.linaro.org/~christophe.lyon/cross-validation/gcc/trunk/234342/report-build-info.html) >> >> The attached small patch fixes that by requiring arm_arch_v4t_multilib >> effective target. >> >> I used arm_arch_v4t_multilib instead of arm_arch_v4t because, as I >> reported a long time ago >> the later does not complain in some unsupported configuration because >> the sample effective >> target test does not contain actual code. In particular it's not >> sufficient to reject thumb-1 with >> hard-float. >> >> OK? > > > No objections from me, but I copied all this from the existing testcase > ftest-armv4t-thumb.c, so I'm puzzled why that one doesn't fail. > It's similar to why I tried to explain above: ftest-armv4t-thumb.c contains only preprocessor tests, no actual code. When the program contains code (or even a single global variable definition), the compiler complains that" Thumb-1 hard-float VFP ABI" is not implemented. A long time ago, I submitted a patch to add some code to the arm_arch_FUNC_ok effective target, but it was not accepted. Christophe. > > Bernd
diff --git a/gcc/testsuite/gcc.target/arm/pr70278.c b/gcc/testsuite/gcc.target/arm/pr70278.c index c44c07b..889f626 100644 --- a/gcc/testsuite/gcc.target/arm/pr70278.c +++ b/gcc/testsuite/gcc.target/arm/pr70278.c @@ -2,6 +2,7 @@ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ /* { dg-options "-mthumb" } */ +/* { dg-require-effective-target arm_arch_v4t_multilib } */ /* { dg-add-options arm_arch_v4t } */ /* * ====================================================