summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/bit-fields2.C
blob: 394d035017af774cf5dc6c936a09e951b9fc6a5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do assemble  }
// GROUPS passed bit-fields
	struct S {
	    char c;
	    int i:8;
	} s;
	
	int main()
	{
	    int &ir = s.i;	// { dg-error "" } address of bitfield
	    int *ip = &s.i;	// { dg-error "" } address of bitfield
	    ir = 10;
	}