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
* ru.po: Update.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
pr60597.C
blob
c61f7679765df086a0ef5fcab6e8507d624a1ac1
1
// PR middle-end/60597
2
// { dg-do compile }
3
// { dg-options "-O2 -g" }
4
5
struct A
6
{
7
int foo () const;
8
int bar () const;
9
int a;
10
};
11
12
struct B
13
{
14
int foo ();
15
int bar ();
16
};
17
18
int *c, d;
19
20
int
21
A::foo () const
22
{
23
int b = a >> 16;
24
return b;
25
}
26
27
int
28
A::bar () const
29
{
30
int b = a;
31
return b;
32
}
33
34
void
35
baz (A &x, B h, int i, int j)
36
{
37
for (; i < h.bar (); ++i)
38
for (; h.foo (); ++j)
39
{
40
int g = x.foo ();
41
int f = x.bar ();
42
int e = c[0] & 1;
43
d = (e << 1) | (g << 16) | (f & 1);
44
c[j] = 0;
45
}
46
}