Commit 42b7febc by Paolo Carlini Committed by Paolo Carlini

re PR c++/53421 (__attribute__((__may_alias__)) prevents taking address of…

re PR c++/53421 (__attribute__((__may_alias__)) prevents taking address of conversion operator member function)

2015-08-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53421
	* g++.dg/ext/attribute-may-alias-1.C: New.
	* g++.dg/ext/attribute-may-alias-2.C: Likewise.

From-SVN: r226868
parent 708768eb
2015-08-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53421
* g++.dg/ext/attribute-may-alias-1.C: New.
* g++.dg/ext/attribute-may-alias-2.C: Likewise.
2015-08-13 Matthew Wahab <matthew.wahab@arm.com>
* gcc.target/aarch64/atomic-inst-cas.c: New.
......
// PR c++/53421
template< class T >
struct Y : T
{ } __attribute__((__may_alias__));
struct X
{
operator Y<X>& () { return *static_cast< Y<X>* >(this); }
};
int main()
{
&X::operator Y<X>&;
}
// PR c++/53421
template< class T >
struct Y : T
{ } __attribute__((__may_alias__));
struct X
{
operator Y<X>& ();
};
Y<X> y = Y<X>();
X::operator Y<X>& () { return *static_cast< Y<X>* >(this); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment