Commit 23fb1469 by Nick Clifton Committed by Nick Clifton

Do not use an explicit alignment value as certain file formats cannot support

particularly large alignments.

From-SVN: r49545
parent 1b8afbe7
2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
* g++.dg/ext/align1.C: Do not use an explicit alignment value
as certain file formats cannot support particularly large
alignments.
* g++.dg/warn/weak1.C: Expect a warning from COFF toolchains,
and do not expect to be able to link the executable.
......
// Test that __attribute__ ((aligned)) is preserved.
// Cygwin does not support alignment greater than 16
// The alignment used to be 64 but Cygwin does not
// support an alignment greater than 16 and COFF
// not support an alignment greater than 4.
extern "C" int printf (const char *, ...);
typedef float at[4][4] __attribute__ ((aligned (64)));
typedef float at[4][4] __attribute__ ((aligned));
float dummy[4][4][15];
static volatile at a1[15];
// { dg-warning "object file alignment" "" { target i?86-pc-cygwin } 10 }
float f1 __attribute__ ((aligned (64)));
// { dg-warning "object file alignment" "" { target i?86-pc-cygwin } 13 }
float f1 __attribute__ ((aligned));
int main()
int
main (void)
{
printf ("%d %d\n", __alignof (a1), __alignof (f1));
return (__alignof (a1) < __alignof (f1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment