repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
bitfield1.C
blob
70a06d0e144569db4d1b3ca6c1e9b62d5be38b4f
1
// Check that we handle bitfields as complex lvalues properly.
2
3
struct A
4
{
5
int i: 2;
6
int j: 2;
7
int k: 2;
8
};
9
10
A a, a2;
11
bool b;
12
void f ();
13
14
int main ()
15
{
16
(f(), a.j) = 1;
17
(f(), a).j = 2; // { dg-warning "overflow" }
18
(b ? a.j : a2.k) = 3; // { dg-warning "overflow" }
19
(b ? a : a2).j = 0;
20
++(a.j) = 1;
21
(a.j = 2) = 3; // { dg-warning "overflow" }
22
}
23
24