This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add -Wno-abi in c++ struct-layout-1 tests
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 25 Sep 2014 09:50:41 +0200
- Subject: Re: [PATCH] Add -Wno-abi in c++ struct-layout-1 tests
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4ZgyMJBp5vB+CKwe+0x400Lzh-RYe1_+0wx-29z5G9PLQ at mail dot gmail dot com> <20140925074305 dot GM17454 at tucnak dot redhat dot com>
On Thu, Sep 25, 2014 at 9:43 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>> > I've noticed that lots of g++ struct-layout-1.exp tests now fail
>> > on ppc*. The problem is the psABI warning:
>> > the layout of aggregates containing vectors with N-byte alignment
>> > For various targets we are using -Wno-abi (and, in C
>> > struct-layout-1.exp also by default) for this, so the patch just
>> > changes the default for C++ testing too.
>>
>> const char *dg_options[] = {
>> -"/* { dg-options \"%s-I%s\" } */\n",
>> +"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
>> "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-*
>> x86_64-*-* } } */\n",
>> "/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux*
>> powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
>> "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target
>> i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32*
>> i?86-*-cygwin* } } */\n",
>>
>> IMO, these should be converted to dg-additional-options.
>
> That would be something like following, except that compat framework doesn't
> support dg-additional-options:
> WARNING: compat.exp does not support dg-additional-options
Huh ...
> -const char *dg_options[] = {
> -"/* { dg-options \"%s-I%s\" } */\n",
> -"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
> -"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
> -"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* } } */\n",
> -"/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
> -"/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
> -"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
> -#define NDG_OPTIONS (sizeof (dg_options) / sizeof (dg_options[0]))
> -};
> +const char dg_options[] =
> +"/* { dg-options \"%s-I%s -Wno-abi\" } */\n"
> +"/* { dg-additional-options \"-mno-mmx\" { target i?86-*-* x86_64-*-* } } */\n"
> +"/* { dg-additional-options \"-fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n"
*-*-darwin*
> +const char dg_options[] =
> +"/* { dg-options \"%s-I%s -Wno-abi\" } */\n"
> +"/* { dg-additional-options \"-mno-mmx\" { target i?86-*-* x86_64-*-* } } */\n"
> +"/* { dg-additional-options \"-fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n"
Also here.
Uros.