Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
rvalue2.C
blob: 77189a5ebfdd324147d2d0a4a7668ec66e06a16b [
file
] [
log
] [
blame
]
// { dg-do run }
// Test for undesired aliasing.
struct
A
{
const
A
*
get_this
()
const
{
return
this
;
}
};
int
main
()
{
A a
;
int
r
=
0
;
const
A
&
ar1
=
(
A
)
a
;
if
(&
ar1
==
&
a
)
r
|=
1
;
if
(
A
(
a
).
get_this
()
==
&
a
)
r
|=
2
;
return
r
;
}