* gcc.c-torture/execute/20030224-2.c: New test.
From-SVN: r64251
This commit is contained in:
parent
59a7f9bf40
commit
09ebf088fb
@ -1,3 +1,7 @@
|
||||
2003-03-12 Daniel Jacobowitz <drow@mvista.com>
|
||||
|
||||
* gcc.c-torture/execute/20030224-2.c: New test.
|
||||
|
||||
2003-03-12 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* gcc.dg/decl-3.c: New test.
|
||||
|
28
gcc/testsuite/gcc.c-torture/execute/20030224-2.c
Normal file
28
gcc/testsuite/gcc.c-torture/execute/20030224-2.c
Normal file
@ -0,0 +1,28 @@
|
||||
/* Make sure that we don't free any temp stack slots associated with
|
||||
initializing marker before we're finished with them. */
|
||||
|
||||
extern void abort();
|
||||
|
||||
typedef struct { short v16; } __attribute__((packed)) jint16_t;
|
||||
|
||||
struct node {
|
||||
jint16_t magic;
|
||||
jint16_t nodetype;
|
||||
int totlen;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct node node, *node_p = &node;
|
||||
|
||||
int main()
|
||||
{
|
||||
struct node marker = {
|
||||
.magic = (jint16_t) {0x1985},
|
||||
.nodetype = (jint16_t) {0x2003},
|
||||
.totlen = node_p->totlen
|
||||
};
|
||||
if (marker.magic.v16 != 0x1985)
|
||||
abort();
|
||||
if (marker.nodetype.v16 != 0x2003)
|
||||
abort();
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user