Commit 031b59ce by Mark Mitchell Committed by Mark Mitchell

ptrmem3.C: New test.

	* g++.dg/opt/ptrmem3.C: New test.

	* g++.old-deja/g++.pt/overload8.C: Remove XFAIL.

From-SVN: r70851
parent 036e07f2
2003-08-27 Mark Mitchell <mark@codesourcery.com>
* g++.dg/opt/ptrmem3.C: New test.
* g++.old-deja/g++.pt/overload8.C: Remove XFAIL.
2003-08-27 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20030826-2.c: New test.
......
// { dg-options "-O1" }
#include <stdio.h>
struct A {
A(int arg) : ia(arg) {}
int x,y,z,ia;
int mf(int arg) { return arg + ia; }
};
int func(int A::*pdm, int (A::*pmf)(int)) // 2. regular function
{
A oa(2);
return ((&oa)->*pdm) + (oa.*pmf)(2);
}
int main()
{
int val;
int A::*pda = &A::ia;
int (A::*pmfa)(int) = &A::mf;
val = func( pda, pmfa );
if(val != 6)
printf("val=%d, expect 6 \n", val);
}
......@@ -7,6 +7,6 @@ struct baz;
void operator*(baz&, double);
template <class T> inline T operator*(double s, const T &p)
; // { dg-bogus "" "" { xfail *-*-* } } - must have argument of class type -
; // { dg-bogus "" "" } - must have argument of class type -
void m(baz& a) { a * .5; }
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