OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20030224-2.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* Make sure that we don't free any temp stack slots associated with
2
   initializing marker before we're finished with them.  */
3
 
4
extern void abort();
5
 
6
typedef struct { short v16; } __attribute__((packed)) jint16_t;
7
 
8
struct node {
9
  jint16_t magic;
10
  jint16_t nodetype;
11
  int totlen;
12
} __attribute__((packed));
13
 
14
struct node node, *node_p = &node;
15
 
16
int main()
17
{
18
  struct node marker = {
19
    .magic = (jint16_t) {0x1985},
20
    .nodetype = (jint16_t) {0x2003},
21
    .totlen = node_p->totlen
22
  };
23
  if (marker.magic.v16 != 0x1985)
24
    abort();
25
  if (marker.nodetype.v16 != 0x2003)
26
    abort();
27
  return 0;
28
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.