diff mbox

Fix g++.dg/compat/struct-layout-1_generate.c options for Windows targets

Message ID Pine.LNX.4.64.1110191856540.9439@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers Oct. 19, 2011, 6:58 p.m. UTC
g++.dg/compat/struct-layout-1_generate.c generates a dg-options line
using -mno-mmx -Wno-abi for i?86-*-* x86_64-*-* - and one using
-fno-common, which takes precedence, for alpha*-dec-osf* hppa*-*-hpux*
powerpc*-*-darwin* *-*-mingw32* *-*-cygwin*.  But at least
i686-mingw32 still needs the -Wno-abi option.  This patch adds the
Windows targets to the case for i?86-*-darwin* x86_64-*-darwin* which
already passes both sets of options.

Tested for cross to i686-mingw32.  OK to commit?

2011-10-19  Joseph Myers  <joseph@codesourcery.com>

	* g++.dg/compat/struct-layout-1_generate.c: Also pass -mno-mmx
	-Wno-abi for i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin*.

Comments

Mike Stump Oct. 19, 2011, 8:33 p.m. UTC | #1
On Oct 19, 2011, at 11:58 AM, "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> g++.dg/compat/struct-layout-1_generate.c generates a dg-options line
> using -mno-mmx -Wno-abi for i?86-*-* x86_64-*-* - and one using
> -fno-common, which takes precedence, for alpha*-dec-osf* hppa*-*-hpux*
> powerpc*-*-darwin* *-*-mingw32* *-*-cygwin*.  But at least
> i686-mingw32 still needs the -Wno-abi option.  This patch adds the
> Windows targets to the case for i?86-*-darwin* x86_64-*-darwin* which
> already passes both sets of options.

> OK to commit?

Ok.
diff mbox

Patch

Index: gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
===================================================================
--- gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c	(revision 180200)
+++ gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c	(working copy)
@@ -47,7 +47,7 @@ 
 "/* { dg-options \"%s-I%s\" } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
 "/* { dg-options \"%s-I%s -fno-common\" { target alpha*-dec-osf* 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* } } */\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",
 "/* { 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]))