This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't run ident tests on powerpc-darwin


> On 26 Dec 2018, at 16:07, David Edelsohn <dje.gcc@gmail.com> wrote:
> 
> On Sun, Dec 23, 2018 at 6:16 AM Iain Sandoe <iain@sandoe.co.uk> wrote:
>> 
>> Hi
>> 
>> The c-c++-common tests fail (or XPASS depending on which) on Darwin
>> because it doesn't currently emit .ident marker.
>> 
>> For powerpc darwin (and, I think, AIX - hence copying David), there’s no
>> .ident support in the assembler, and we need to skip the tests.
>> 
>> In this case, I suggest that it’s not worth having a target-supports entry.
>> This is because what a target chooses to emit for -fident is controlled by
>> a target hook and therefore there’s no guarantee that a target-supports
>> that triggers off “ .ident” in the asm would be generically useful.
>> 
>> OTOH, if the testsuite maintainers prefer a support .. it can be done ;-)
>> 
>> OK for trunk?
>> Iain
>> 
>> gcc/testsuite/
>> 
>>        * c-c++-common/ident-0a.c: Skip for powerpc-darwin.
>>        * c-c++-common/ident-0b.c: Likewise.
>>        * c-c++-common/ident-1a.c: Likewise.
>>        * c-c++-common/ident-1b.c: Likewise.
>>        * c-c++-common/ident-2a.c: Likewise.
>>        * c-c++-common/ident-2b.c: Likewise.
> 
> AIX Assembler doesn't support "ident", but GCC doesn't emit an "ident"
> string on AIX.  The failure on AIX is the assembler output doesn't
> match the expected result, but it doesn't fail to assemble due to an
> unrecognized pseudo-op.

Right that’s the cause of the XPASSes and FAILs  respectively.
> 
> Does GCC generate an ident pseudo-op on Darwin?  
> Maybe because of
> common code inherited by Darwin that defines TARGET_ASM_OUTPUT_IDENT.

no that is disabled there too.

Darwin was not trying to emit the .ident (TARGET_ASM_OUTPUT_IDENT was undefined).

That leads to the effect noted above.  Since the assembler doesn’t support .ident we can’t fix the tests by adding TARGET_ASM_OUTPUT_IDENT, so I’ve skipped them.  

If, one day, we fix the assembler to accept .ident (or use a more modern one that already does) then those skip lines can be removed.

> I had been testing an expected fail for those tests on AIX, e.g.,

Ah, that might be an alternate scheme, indeed.  However, for now (on Darwin) I just settled for the simple one.

Iain

> 
> Index: ident-2b.c
> ===================================================================
> --- ident-2b.c  (revision 267421)
> +++ ident-2b.c  (working copy)
> @@ -5,4 +5,4 @@
> /* { dg-skip-if "no assembler .ident support" { powerpc*-*-darwin* } } */
> int ident;
> 
> -/* { dg-final { scan-assembler-times "GCC: " 1 } } */
> +/* { dg-final { scan-assembler-times "GCC: " 1 { xfail
> powerpc-ibm-aix* } } } */
> 
> Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]