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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [bf-ms-attrib.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* bf-ms-attrib.c */
2
/* Adapted from Donn Terry <donnte@microsoft.com> testcase
3
   posted to GCC-patches
4
   http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */
5
 
6
/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* } } */
7
 
8
/* We don't want the default "pedantic-errors" in this case, since we're
9
   testing nonstandard stuff to begin with. */
10
/* { dg-options "-ansi" } */
11
 
12
extern void abort(void);
13
 
14
struct one_gcc {
15
  int d;
16
  unsigned char a;
17
  unsigned short b:7;
18
  char c;
19
} __attribute__((__gcc_struct__)) ;
20
 
21
 
22
struct one_ms {
23
  int d;
24
  unsigned char a;
25
  unsigned short b:7;
26
  char c;
27
} __attribute__((__ms_struct__));
28
 
29
 
30
main()
31
  {
32
    /* As long as the sizes are as expected, we know attributes are working.
33
       bf-ms-layout.c makes sure the right thing happens when the attribute
34
       is on. */
35
    if (sizeof(struct one_ms) != 8)
36
        abort();
37
    if (sizeof(struct one_gcc) != 8)
38
        abort();
39
    return 0;
40
  }

powered by: WebSVN 2.1.0

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