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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [strct-pack-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
typedef struct
2
{
3
  short s __attribute__ ((aligned(2), packed));
4
  double d __attribute__ ((aligned(2), packed));
5
} TRIAL;
6
 
7
int
8
check (TRIAL *t)
9
{
10
  if (t->s != 1 || t->d != 16.0)
11
    return 1;
12
  return 0;
13
}
14
 
15
main ()
16
{
17
  TRIAL trial;
18
 
19
  trial.s = 1;
20
  trial.d = 16.0;
21
 
22
  if (check (&trial) != 0)
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.