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
c++: constantness of call to function pointer [PR111703]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr60438-1.C
blob
3f79dd770eb083d45a49dc4e8143fe17a7775c4c
1
// { dg-do compile }
2
// { dg-options "-fomit-frame-pointer" }
3
4
struct A { int a; };
5
struct B { A foo (); };
6
struct C { B *foo (); };
7
int foo (struct C *, float);
8
void bar (struct C *);
9
void baz (struct A *);
10
int a, b, c;
11
12
int
13
foo (struct C *y, float x)
14
{
15
struct A d;
16
if (c)
17
bar (y);
18
else
19
{
20
C g;
21
g.foo ()->foo ();
22
a = b;
23
d.a = (int) (b * x);
24
}
25
baz (&d);
26
27
return 0;
28
}