public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/33774] New: Cygwin/mingw do not support 16 byte alignment of struct/union fields
@ 2007-10-14 23:47 dannysmith at users dot sourceforge dot net
2007-10-15 2:15 ` [Bug target/33774] " patchapp at dberlin dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2007-10-14 23:47 UTC (permalink / raw)
To: gcc-bugs
The following testcase fails on mingw32
=======================================================================
typedef int __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
typedef union
{
float f[4];
__m128 m;
} foo;
int test1[__alignof(__m128) >= 16 ? 1 : -1 ]; // OK
int test2[__alignof(foo) >= 16 ? 1 : -1 ]; // Fails: alignof foo = 8
========================================================================
with:
> foo.c:11: error: size of array 'test2' is negative.
The problem is config/i386/cygming.h
#define BIGGEST_FIELD_ALIGNMENT 64
which is a leftover from a time when this define was necessary and
sufficient to enable 8 byte alignment for doubles--consistent with the
target default MASK_ALIGN_DOUBLE--and when GNU ld could only handle 8
byte alignment.
Currently testing a patch.
--
Summary: Cygwin/mingw do not support 16 byte alignment of
struct/union fields
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: dannysmith at users dot sourceforge dot net
ReportedBy: dannysmith at users dot sourceforge dot net
GCC build triplet: i686-pc-mingw32
GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33774
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/33774] Cygwin/mingw do not support 16 byte alignment of struct/union fields
2007-10-14 23:47 [Bug target/33774] New: Cygwin/mingw do not support 16 byte alignment of struct/union fields dannysmith at users dot sourceforge dot net
@ 2007-10-15 2:15 ` patchapp at dberlin dot org
2007-10-18 21:04 ` dannysmith at users dot sourceforge dot net
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: patchapp at dberlin dot org @ 2007-10-15 2:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from patchapp at dberlin dot org 2007-10-15 02:15 -------
Subject: Bug number PR target/33774
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00853.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33774
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/33774] Cygwin/mingw do not support 16 byte alignment of struct/union fields
2007-10-14 23:47 [Bug target/33774] New: Cygwin/mingw do not support 16 byte alignment of struct/union fields dannysmith at users dot sourceforge dot net
2007-10-15 2:15 ` [Bug target/33774] " patchapp at dberlin dot org
@ 2007-10-18 21:04 ` dannysmith at users dot sourceforge dot net
2007-11-08 20:20 ` dannysmith at gcc dot gnu dot org
2007-11-08 20:21 ` dannysmith at users dot sourceforge dot net
3 siblings, 0 replies; 5+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2007-10-18 21:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dannysmith at users dot sourceforge dot net 2007-10-18 21:04 -------
The native compiler MSVC++ does not limit field alignment to 64 bits, but as
documented here
Windows Data Alignment on IPF, x86, and x64
http://msdn2.microsoft.com/en-us/library/Aa290049(VS.71).aspx
supports at least up to 256-bit field alignment (see Listing 5 in above
article).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33774
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/33774] Cygwin/mingw do not support 16 byte alignment of struct/union fields
2007-10-14 23:47 [Bug target/33774] New: Cygwin/mingw do not support 16 byte alignment of struct/union fields dannysmith at users dot sourceforge dot net
2007-10-15 2:15 ` [Bug target/33774] " patchapp at dberlin dot org
2007-10-18 21:04 ` dannysmith at users dot sourceforge dot net
@ 2007-11-08 20:20 ` dannysmith at gcc dot gnu dot org
2007-11-08 20:21 ` dannysmith at users dot sourceforge dot net
3 siblings, 0 replies; 5+ messages in thread
From: dannysmith at gcc dot gnu dot org @ 2007-11-08 20:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dannysmith at gcc dot gnu dot org 2007-11-08 20:20 -------
Subject: Bug 33774
Author: dannysmith
Date: Thu Nov 8 20:20:02 2007
New Revision: 130024
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130024
Log:
PR target/33774
* config/i386/cygming.h (BIGGEST_FIELD_ALIGNMENT): Define only if
IN_TARGET_LIBS.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/cygming.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33774
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/33774] Cygwin/mingw do not support 16 byte alignment of struct/union fields
2007-10-14 23:47 [Bug target/33774] New: Cygwin/mingw do not support 16 byte alignment of struct/union fields dannysmith at users dot sourceforge dot net
` (2 preceding siblings ...)
2007-11-08 20:20 ` dannysmith at gcc dot gnu dot org
@ 2007-11-08 20:21 ` dannysmith at users dot sourceforge dot net
3 siblings, 0 replies; 5+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2007-11-08 20:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dannysmith at users dot sourceforge dot net 2007-11-08 20:21 -------
Fixed on trunk.
Danny
--
dannysmith at users dot sourceforge dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33774
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-08 20:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-14 23:47 [Bug target/33774] New: Cygwin/mingw do not support 16 byte alignment of struct/union fields dannysmith at users dot sourceforge dot net
2007-10-15 2:15 ` [Bug target/33774] " patchapp at dberlin dot org
2007-10-18 21:04 ` dannysmith at users dot sourceforge dot net
2007-11-08 20:20 ` dannysmith at gcc dot gnu dot org
2007-11-08 20:21 ` dannysmith at users dot sourceforge dot net
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).