This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] PATCH for libstdc++/37761


My demangler work changed the spacing of some expression output, which broke some demangler tests in libstdc++. Fixed thus.

Tested i686-pc-linux-gnu, applied to trunk.
2008-10-07  Jason Merrill  <jason@redhat.com>

	PR libstdc++/37761
	* testsuite/abi/demangle/abi_examples/20.cc: Adjust expected spacing.
	* testsuite/abi/demangle/abi_text/02.cc: Likewise.
	* testsuite/abi/demangle/regression/cw-16.cc: Likewise.

Index: testsuite/abi/demangle/abi_text/02.cc
===================================================================
*** testsuite/abi/demangle/abi_text/02.cc	(revision 140915)
--- testsuite/abi/demangle/abi_text/02.cc	(working copy)
*************** int main()
*** 33,39 ****
    // Equivalent, but formatting difference in void argument and parentheses.
    // icc, __cxa_demangle
    verify_demangle("_Z3fooILi2EEvRAplT_Li1E_i", 
! 		  "void foo<2>(int (&) [(2) + (1)])");
    // cplus-dem
    // verify_demangle("_Z3fooILi2EEvRAplT_Li1E_i", 
    //      "void foo<(int)2>(int (&) [((int)2)+((int)1)])");
--- 33,39 ----
    // Equivalent, but formatting difference in void argument and parentheses.
    // icc, __cxa_demangle
    verify_demangle("_Z3fooILi2EEvRAplT_Li1E_i", 
! 		  "void foo<2>(int (&) [(2)+(1)])");
    // cplus-dem
    // verify_demangle("_Z3fooILi2EEvRAplT_Li1E_i", 
    //      "void foo<(int)2>(int (&) [((int)2)+((int)1)])");
Index: testsuite/abi/demangle/regression/cw-16.cc
===================================================================
*** testsuite/abi/demangle/regression/cw-16.cc	(revision 140915)
--- testsuite/abi/demangle/regression/cw-16.cc	(working copy)
*************** verify_demangle("_Z3fooIA6_KiEvA9_KT_rVP
*** 32,40 ****
  		"void foo<int const [6]>(int const [9][6], int restrict const (* volatile restrict) [9][6])");
  // 2003/11/12, libstdc++/12947
  verify_demangle("_Z1fILi5E1AEvN1CIXqugtT_Li0ELi1ELi2EEE1qE",
!                 "void f<5, A>(C<(((5) > (0))) ? (1) : (2)>::q)");
  verify_demangle("_Z1fILi5EEvN1AIXcvimlT_Li22EEE1qE",
!                 "void f<5>(A<(int)((5) * (22))>::q)");
  verify_demangle("_Z1fPFYPFiiEiE",
                  "f(int (*(*)(int))(int))");
  verify_demangle("_Z1fI1XENT_1tES2_",
--- 32,40 ----
  		"void foo<int const [6]>(int const [9][6], int restrict const (* volatile restrict) [9][6])");
  // 2003/11/12, libstdc++/12947
  verify_demangle("_Z1fILi5E1AEvN1CIXqugtT_Li0ELi1ELi2EEE1qE",
!                 "void f<5, A>(C<(((5)>(0)))?(1) : (2)>::q)");
  verify_demangle("_Z1fILi5EEvN1AIXcvimlT_Li22EEE1qE",
!                 "void f<5>(A<(int)((5)*(22))>::q)");
  verify_demangle("_Z1fPFYPFiiEiE",
                  "f(int (*(*)(int))(int))");
  verify_demangle("_Z1fI1XENT_1tES2_",
*************** verify_demangle("_Z1fILi5E1AEvN1CIXstN1T
*** 43,51 ****
                  "void f<5, A>(C<sizeof (T::t), sizeof (T::t)>::q)");
  // 2003/12/03, libstdc++/13045
  verify_demangle("_Z1fILi1ELc120EEv1AIXplT_cviLd4028ae147ae147aeEEE",
!                 "void f<1, (char)120>(A<(1) + ((int)((double)[4028ae147ae147ae]))>)");
  verify_demangle("_Z1fILi1ELc120EEv1AIXplT_cviLf3f800000EEE",
!                 "void f<1, (char)120>(A<(1) + ((int)((float)[3f800000]))>)");
  verify_demangle("_Z9hairyfuncM1YKFPVPFrPA2_PM1XKFKPA3_ilEPcEiE",
                  "hairyfunc(int (* const (X::** (* restrict (* volatile* (Y::*)(int) const)(char*)) [2])(long) const) [3])");
  
--- 43,51 ----
                  "void f<5, A>(C<sizeof (T::t), sizeof (T::t)>::q)");
  // 2003/12/03, libstdc++/13045
  verify_demangle("_Z1fILi1ELc120EEv1AIXplT_cviLd4028ae147ae147aeEEE",
!                 "void f<1, (char)120>(A<(1)+((int)((double)[4028ae147ae147ae]))>)");
  verify_demangle("_Z1fILi1ELc120EEv1AIXplT_cviLf3f800000EEE",
!                 "void f<1, (char)120>(A<(1)+((int)((float)[3f800000]))>)");
  verify_demangle("_Z9hairyfuncM1YKFPVPFrPA2_PM1XKFKPA3_ilEPcEiE",
                  "hairyfunc(int (* const (X::** (* restrict (* volatile* (Y::*)(int) const)(char*)) [2])(long) const) [3])");
  
Index: testsuite/abi/demangle/abi_examples/20.cc
===================================================================
*** testsuite/abi/demangle/abi_examples/20.cc	(revision 140915)
--- testsuite/abi/demangle/abi_examples/20.cc	(working copy)
*************** int main()
*** 29,35 ****
    using namespace __gnu_test;
  
    verify_demangle("_ZngILi42EEvN1AIXplT_Li2EEE1TE", 
!        "void operator-<42>(A<(42) + (2)>::T)");
  
    return 0;
  }
--- 29,35 ----
    using namespace __gnu_test;
  
    verify_demangle("_ZngILi42EEvN1AIXplT_Li2EEE1TE", 
!        "void operator-<42>(A<(42)+(2)>::T)");
  
    return 0;
  }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]