repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
init
/
bitfield2.C
blob
e54b2e423fb6c322756ef533c7a75fa82a946aac
1
// PR c++/13371
2
// Bug: We were failing to properly protect the lhs on the line marked
3
// "here" from multiple evaluation.
4
5
// { dg-do run }
6
7
extern "C" int printf (const char *, ...);
8
9
enum E { E1, E2 };
10
11
struct A
12
{
13
E e : 8;
14
unsigned char c;
15
};
16
17
A ar[2];
18
19
int c;
20
21
int f()
22
{
23
++c;
24
printf ("f()\n");
25
return 0;
26
}
27
28
int main()
29
{
30
ar[0].c = 0xff;
31
ar[f()].e = E1; // here
32
return (c != 1 || ar[0].c != 0xff);
33
}