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
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
field2.C
blob
5dd1e97fb2703e7d83d5458ae18f9e4bf2ec0d7c
1
// { dg-do run }
2
// Test for proper handling of field calls.
3
// Contributed by Jason Merrill <jason@cygnus.com>
4
5
struct A {
6
inline A* operator()() { return this; }
7
};
8
9
struct B {
10
int i;
11
union { A a; };
12
};
13
14
int
15
main ()
16
{
17
B b;
18
A* ap = &b.a;
19
A* ap2 = b.a();
20
return (ap != ap2);
21
}