summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/addrof1.C
blob: 2702ee07b8ef0eef6b30e08f7cabea12a6313ab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// { dg-do run  }

extern "C" void abort ();

typedef struct st {
        unsigned char   a;
        unsigned char   b;
        unsigned char   c;
        unsigned char   d;
} __attribute__((aligned(4))) st;

void testme(int, int, int);

static inline void
stupid_func(st s)
{
        testme(s.a, s.b, s.c);
}

int main()
{
        st s;

        s.a = s.b = s.c = 216;
        stupid_func(s);

        return 0;
}    

void testme(int a, int b, int c)
{
  if (a != 216 || b != 216 || c != 216)
    abort();
}