OSDN Git Service

2006-08-17 Paolo Bonzini <bonzini@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / parse / offsetof6.C
1 /* { dg-do compile } */
2
3 // From PR28573
4
5 struct A
6 {
7   char d[44];
8   char &operator [] ( int indx ) { return d[indx]; }
9 };
10
11 struct B
12 {
13   A a;
14 };
15
16 int main()
17 {
18   return __builtin_offsetof(B, a[0]); /* { dg-error "cannot apply.*offsetof" } */
19 }