OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20030224-2.c] - Rev 452

Go to most recent revision | Compare with Previous | Blame | View Log

/* 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;
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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