public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch/Testsuite] struct-layout-1_generate.c: Use -fno-common for cygwin and mingw32
@ 2007-11-08  2:23 Danny Smith
  2007-11-08 17:34 ` Janis Johnson
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Smith @ 2007-11-08  2:23 UTC (permalink / raw)
  To: gcc-patches; +Cc: janis187

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

The PE-COFF object format, as supported by GNU binintils, does allow
aligned common.

Several generated testcases in compat-struct-layout put objects
requiring large alignment into
.comm. In past, these have passed because of

(1) an ill-defined BIGGEST_FIELD_ALIGNMENT in config/i386/cygming.h
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33774

and

(2) failure to set the section alignment flags in object files as per
PE-COFF spec. The gas bug has been fixed in binutils CVS.
http://sourceware.org/ml/binutils/2007-11/msg00027.html

This patch adds the -fno-common flag to generated testcases for cygwin
and mingw targets so that I can fix BIGGEST_FIELD_ALIGNMENT bug without
causing testsuite regressions.


2007-11-08  Danny Smith  <dannysmith@users.sourceforge.net>

	* gcc.dg/compat/struct-layout-1_generate.c (dg-options) Add
	-fno-common for cygwin and mingw32.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: compat-nocommon.diff --]
[-- Type: text/x-patch; name=compat-nocommon.diff, Size: 1537 bytes --]

Index: testsuite/gcc.dg/compat/struct-layout-1_generate.c
===================================================================
--- testsuite/gcc.dg/compat/struct-layout-1_generate.c	(revision 129863)
+++ testsuite/gcc.dg/compat/struct-layout-1_generate.c	(working copy)
@@ -763,7 +763,7 @@
     }
   fprintf (outfile, "\
 /* { dg-options \"-I%s\" } */\n\
-/* { dg-options \"-I%s -fno-common\" { target hppa*-*-hpux* *-*-darwin* } } */\n\
+/* { dg-options \"-I%s -fno-common\" { target hppa*-*-hpux* *-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n\
 /* { dg-options \"-I%s -mno-base-addresses\" { target mmix-*-* } } */\n\
 #include \"struct-layout-1.h\"\n\
 \n\
@@ -790,7 +790,7 @@
     goto fail;
   fprintf (outfile, "\
 /* { dg-options \"-w -I%s\" } */\n\
-/* { dg-options \"-w -I%s -fno-common\" { target hppa*-*-hpux* *-*-darwin* } } */\n\
+/* { dg-options \"-w -I%s -fno-common\" { target hppa*-*-hpux* *-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n\
 /* { dg-options \"-w -I%s -mno-base-addresses\" { target mmix-*-* } } */\n\
 #include \"struct-layout-1_x1.h\"\n\
 #include \"t%03d_test.h\"\n\
@@ -803,7 +803,7 @@
     goto fail;
   fprintf (outfile, "\
 /* { dg-options \"-w -I%s\" } */\n\
-/* { dg-options \"-w -I%s -fno-common\" { target hppa*-*-hpux* *-*-darwin* } } */\n\
+/* { dg-options \"-w -I%s -fno-common\" { target hppa*-*-hpux* *-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n\
 /* { dg-options \"-w -I%s -mno-base-addresses\" { target mmix-*-* } } */\n\
 #include \"struct-layout-1_y1.h\"\n\
 #include \"t%03d_test.h\"\n\

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch/Testsuite] struct-layout-1_generate.c: Use -fno-common  for cygwin and mingw32
  2007-11-08  2:23 [Patch/Testsuite] struct-layout-1_generate.c: Use -fno-common for cygwin and mingw32 Danny Smith
@ 2007-11-08 17:34 ` Janis Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Janis Johnson @ 2007-11-08 17:34 UTC (permalink / raw)
  To: Danny Smith; +Cc: gcc-patches

On Thu, 2007-11-08 at 15:23 +1300, Danny Smith wrote:
> 
> 2007-11-08  Danny Smith  <dannysmith@users.sourceforge.net>
> 
> 	* gcc.dg/compat/struct-layout-1_generate.c (dg-options) Add
> 	-fno-common for cygwin and mingw32.

OK.

Janis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-08 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-08  2:23 [Patch/Testsuite] struct-layout-1_generate.c: Use -fno-common for cygwin and mingw32 Danny Smith
2007-11-08 17:34 ` Janis Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).