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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [rx/] [pack.c] - Blame information for rev 695

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
 
3
typedef unsigned short  INT16U;
4
 
5
typedef struct tst_2
6
{
7
  INT16U        f0;     /* [+0] */
8
  INT16U *      f1;     /* [+2] */
9
  INT16U        f2;     /* [+6] */
10
  INT16U *      f3;     /* [+8] */
11
} __attribute__ ((__packed__)) t2;
12
 
13
#include <stddef.h>
14
#include <stdlib.h>
15
 
16
int main (void)
17
{
18
  if (offsetof (t2, f1) != 2)
19
    abort ();
20
  if (offsetof (t2, f2) != 6)
21
    abort ();
22
  if (offsetof (t2, f3) != 8)
23
    abort ();
24
  exit (0);
25
}

powered by: WebSVN 2.1.0

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