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/] [strct-pack-1.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 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.