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
/
tree-ssa
/
pr26757.C
blob
4d124e3c45d6472689d5d8d35145caf1ac9d05ad
1
// PR c++/26757
2
// { dg-do run }
3
// { dg-options "-O" }
4
5
extern "C" void abort ();
6
7
typedef struct A
8
{
9
int c;
10
int d;
11
} A;
12
13
A *b;
14
15
void
16
foo ()
17
{
18
b->c++;
19
extern A *b;
20
b->d++;
21
22
}
23
24
void
25
bar ()
26
{
27
if (b->d)
28
b->c++;
29
}
30
31
32
int
33
main ()
34
{
35
A a = { 0, 0 };
36
b = &a;
37
foo ();
38
bar ();
39
if (b->c != 2)
40
abort ();
41
if (b->d != 1)
42
abort ();
43
return 0;
44
}