diff mbox

C++ testsuite PATCH to overhaul running of tests in C++11 mode

Message ID 87aa5hs4gz.fsf@firetop.home
State New
Headers show

Commit Message

Richard Sandiford Jan. 21, 2012, 11:02 a.m. UTC
A mere two months after you posted the patch:

Jason Merrill <jason@redhat.com> writes:
> diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
> index 8802e98..19f1591 100644
> --- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
> +++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
> @@ -13,30 +13,22 @@ public:
>  };
>  
>  template <void (A::*)() >
> -void g() {}			// { dg-message "void g" }
> +void g() {}
>  template <int A::*>
> -void h() {}			// { dg-message "void h" }
> +void h() {}
>  
>  
>  int main() {
>    g<&A::f>();
>    h<&A::i>();
>    g<&B::f>(); // { dg-error "" } 
> -  // { dg-message "candidate" "candidate note" { target *-*-* } 24 }
>    h<&B::j>(); // { dg-error "" } 
> -  // { dg-message "candidate" "candidate note" { target *-*-* } 26 }
> -  g<(void (A::*)()) &A::f>(); // { dg-error "" } 
> -  // { dg-message "candidate" "candidate note" { target *-*-* } 28 }
> -  h<(int A::*) &A::i>(); // { dg-error "" } 
> -  // { dg-message "candidate" "candidate note" { target *-*-* } 30 }
> +  g<(void (A::*)()) &A::f>(); // { dg-error "" "" { xfail c++11 } }
> +  h<(int A::*) &A::i>(); // { dg-error "" "" { xfail c++11 } }
>    g<(void (A::*)()) &B::f>(); // { dg-error "" } 
> -  // { dg-message "candidate" "candidate note" { target *-*-* } 32 }
>    h<(int A::*) &B::j>(); // { dg-error "" } 
> -  // { dg-message "candidate" "candidate note" { target *-*-* } 34 }
> -  g<(void (A::*)()) 0>(); // { dg-error "" } 
> -  // { dg-message "candidate" "candidate note" { target *-*-* } 36 }
> -  h<(int A::*) 0>(); // { dg-error "" } 
> -  // { dg-message "candidate" "candidate note" { target *-*-* } 38 }
> +  g<(void (A::*)()) 0>(); // { dg-error "" "" { target c++98 } }
> +  h<(int A::*) 0>(); // { dg-error "" "" { target c++98 } }
>  
>    return 0;
>  }

Does this mean that the { target c++98 } lines are acceptable in C++11,
while the { xfail c++11 } lines are still errors in C++11, but aren't
detected?  (Daft question really, but wanted to check.)

The reason for asking is that the line:

    g<(void (A::*)()) &B::f>(); // { dg-error "" } 

also fails for C++11 on targets that define TARGET_PTRMEMFUNC_VBIT_LOCATION
to ptrmemfunc_vbit_in_delta.  Is that expected, and if so, is the patch
below OK?  Or should I try to look at it a bit further first?

(This is the only failing C++ test on mips64-linux-gnu.)

Thanks,
Richard


gcc/testsuite/
	* g++.old-deja/g++.pt/ptrmem6.C: xfail a test for ARM and MIPS
	in C++11 mode.

Comments

Jason Merrill Jan. 21, 2012, 4:49 p.m. UTC | #1
On 01/21/2012 06:02 AM, Richard Sandiford wrote:
> Does this mean that the { target c++98 } lines are acceptable in C++11,
> while the { xfail c++11 } lines are still errors in C++11, but aren't
> detected?

Right.

> The reason for asking is that the line:
>
>      g<(void (A::*)())&B::f>(); // { dg-error "" }
>
> also fails for C++11 on targets that define TARGET_PTRMEMFUNC_VBIT_LOCATION
> to ptrmemfunc_vbit_in_delta.  Is that expected, and if so, is the patch
> below OK?  Or should I try to look at it a bit further first?

I'm not sure why that would be, but the patch is OK.  I wouldn't worry 
about trying to get this line right until we fix the other xfails.

Jason
diff mbox

Patch

Index: gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
===================================================================
--- gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C	2012-01-21 10:53:09.000000000 +0000
+++ gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C	2012-01-21 10:57:31.000000000 +0000
@@ -25,7 +25,7 @@  int main() {
   h<&B::j>(); // { dg-error "" } 
   g<(void (A::*)()) &A::f>(); // { dg-error "" "" { xfail c++11 } }
   h<(int A::*) &A::i>(); // { dg-error "" "" { xfail c++11 } }
-  g<(void (A::*)()) &B::f>(); // { dg-error "" } 
+  g<(void (A::*)()) &B::f>(); // { dg-error "" "" { xfail { c++11 && { arm*-*-* mips*-*-* } } } }
   h<(int A::*) &B::j>(); // { dg-error "" } 
   g<(void (A::*)()) 0>(); // { dg-error "" "" { target c++98 } }
   h<(int A::*) 0>(); // { dg-error "" "" { target c++98 } }