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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [20010202-1.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile { target i?86-*-* sparc*-*-* x86_64-*-* } } */
2
/* { dg-options "-O2" } */
3
 
4
extern void abort (void);
5
extern void exit (int);
6
 
7
typedef enum { false, true } __attribute__ ((packed)) boolean;
8
typedef struct {
9
  enum {
10
    A0 = 0, A1 = 1, A2 = 2
11
  } __attribute__((packed)) A:3;
12
  enum {
13
    B0 = 0, B1 = 1, B2 = 2
14
  } __attribute__((packed)) B:3;
15
  boolean C:1;
16
  boolean D:1;
17
  unsigned char :8;
18
} foo;
19
foo x = { A2, B1, false, true };
20
 
21
int main(void)
22
{
23
  if (sizeof (foo) != 2 || __alignof__ (foo) != 1)
24
    abort ();
25
 
26
  exit (0);
27
}

powered by: WebSVN 2.1.0

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