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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [attr-ms_struct-2.c] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* Test for MS structure sizes.  */
2
/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-darwin* } } */
3
/* { dg-require-effective-target ilp32 } */
4
/* { dg-options "-std=gnu99" } */
5
 
6
extern void abort ();
7
 
8
#define ATTR __attribute__((__ms_struct__))
9
 
10
struct _struct_0
11
{
12
  long  member_0   : 25 ;
13
  short  member_1   : 6 ;
14
  char  member_2   : 2 ;
15
  unsigned  short  member_3   : 1 ;
16
  unsigned  char  member_4   : 7 ;
17
  short  member_5   : 16 ;
18
  long  : 0 ;
19
  char  member_7  ;
20
 
21
} ATTR;
22
typedef struct _struct_0 struct_0;
23
 
24
#define size_struct_0 20
25
 
26
struct_0 test_struct_0 = { 18557917, 17, 3, 0, 80, 6487, 93 };
27
 
28
int
29
main (void)
30
{
31
 
32
  if (size_struct_0 != sizeof (struct_0))
33
    abort ();
34
 
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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