[PATCH] Add -Wno-abi in c++ struct-layout-1 tests

Jakub Jelinek jakub@redhat.com
Thu Sep 25 07:01:00 GMT 2014


Hi!

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.

Regtested on x86_64-linux and powerpc*-linux, ok for trunk/4.9/4.8?

2014-09-25  Jakub Jelinek  <jakub@redhat.com>

	* g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
	to default options.

--- gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c.jj	2012-03-14 09:39:38.000000000 +0100
+++ gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c	2014-09-24 07:59:10.086096164 +0200
@@ -1,5 +1,5 @@
 /* Structure layout test generator.
-   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
+   Copyright (C) 2004-2014
    Free Software Foundation, Inc.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
@@ -44,7 +44,7 @@ along with GCC; see the file COPYING3.
 #endif
 
 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",

	Jakub



More information about the Gcc-patches mailing list