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-common.c (catenate_strings): New.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
rvalue2.C
blob
77189a5ebfdd324147d2d0a4a7668ec66e06a16b
1
// { dg-do run }
2
// Test for undesired aliasing.
3
4
struct A {
5
const A * get_this () const { return this; }
6
};
7
8
int main ()
9
{
10
A a;
11
int r = 0;
12
const A& ar1 = (A)a;
13
if (&ar1 == &a)
14
r |= 1;
15
if (A(a).get_this () == &a)
16
r |= 2;
17
return r;
18
}