Commit a5de05b7 by Robert Lipe Committed by Robert Lipe

* gcc.dg/pragma-align.c: New test.

From-SVN: r36323
parent 52a21fc6
2000-09-11 Robert Lipe <robertl@sco.com>
* gcc.dg/pragma-align.c: New test.
2000-09-11 Nathan Sidwell <nathan@codesourcery.com> 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/explicit82.C: New test. * g++.old-deja/g++.pt/explicit82.C: New test.
......
/* Prove that HANDLE_SYSTEMV_PRAGMA alignment handling works somewhat. */
/* { dg-do compile { target i?86-*-linux* i?86-*-*bsd* i?86-*-sco3.2v5* } } */
struct {
char one;
long two;
} defaultalign;
#pragma pack(4)
struct {
char one;
long two;
} sixteen;
#pragma pack(1)
struct {
char one;
long two;
} two;
#pragma pack(2)
struct {
char one;
long two;
} three;
#pragma pack()
struct {
char one;
long two;
} resetalign;
main()
{
if(sizeof(sixteen) < sizeof(defaultalign)) abort();
if(sizeof(two) >= sizeof(defaultalign)) abort();
if(sizeof(three) <= sizeof(two)) abort();
if(sizeof(resetalign) != sizeof(defaultalign)) abort();
}
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