Update the test suite to reflect recent fixes and merges from trunk.

The following changes happened in this patch.

Conversion of a compilation failure to an assembly diff failure:

    remove the dg comments and add the comment // pph asm xdiff

Conversion of a ICE to a BOGUS

    change the dg-xfail-if line from ICE to BOGUS
    change the dg-bogus line from the ICE message to the BOGUS message
    remove the dg-prune-output lines corresponding to the ICE
        (dg knows to remove them for errors, but not for ICEs)

Update line numbers from a merge (or other edits to regular sources)
    change the line number from old to new as reflected in the test log

The output of make check filtered through the following sed command
should yield no FAIL and no XPASS.

sed -e '
        /-fpph-map=pph.map/     ! {
                /^XPASS: .*test for bogus messages/     d
                /^XPASS: .*test for excess errors/      d
        }

        /^#/    p
        /^ERROR: /      p
        /^XFAIL: /      p
        /^XPASS: /      p
        /^FAIL: /       p

        d
'

The same command works to filter the log file to its essential record
of pass/fail.  In particular, it enables listing XFAILs that need work.


Index: gcc/testsuite/ChangeLog.pph

2011-06-08  Lawrence Crowl <cr...@google.com>

        * lib/dg-pph.exp (dg-pph-pos): Stop redundantly reporting a missing
        pph assembly as an xfail when its compile xfails.
        * g++.dg/pph/x1typerefs.cc: Replace ICE xfail with a bogus error xfail.
        * g++.dg/pph/x1tmplclass.cc: Likewise.
        * g++.dg/pph/x1autometh.cc: Replace ICE xfail with an assembly diff
        xfail.
        * g++.dg/pph/x1special.cc: Remove ICE xfail.
        * g++.dg/pph/x1functions.cc: Correct xfail to BOGUS rather than ERROR.
        Remove leftover pruning from previous ICE.
        * g++.dg/pph/x1template.cc: Update line number of ICE.
        * g++.dg/pph/x1variables.cc: Update line number of BOGUS.


Index: gcc/testsuite/lib/dg-pph.exp
===================================================================
--- gcc/testsuite/lib/dg-pph.exp        (revision 174789)
+++ gcc/testsuite/lib/dg-pph.exp        (working copy)
@@ -94,9 +94,7 @@ proc dg-pph-pos { subdir test options ma
     # Quit if it did not compile successfully.
     if { ![file_on_host exists "$bname.s"] } {
        # Expect assembly to be missing when the compile is an expected fail.
-       if { [llength [grep $test "dg-xfail-if.*-fpph-map"]] } {
-           xfail "$nshort $options (pph assembly missing)"
-       } else {
+       if { ![llength [grep $test "dg-xfail-if.*-fpph-map"]] } {
            fail "$nshort $options (pph assembly missing)"
        }
        return
Index: gcc/testsuite/g++.dg/pph/x1typerefs.cc
===================================================================
--- gcc/testsuite/g++.dg/pph/x1typerefs.cc      (revision 174789)
+++ gcc/testsuite/g++.dg/pph/x1typerefs.cc      (working copy)
@@ -1,6 +1,5 @@
-// { dg-xfail-if "ICE" { "*-*-*" } { "-fpph-map=pph.map" } }
-// { dg-bogus "c1typerefs.h:11:18: internal compiler error: Segmentation 
fault" "" { xfail *-*-* } 0 }
-// { dg-prune-output "In file included from " }
+// { dg-xfail-if "BOGUS" { "*-*-*" } { "-fpph-map=pph.map" } }
+// { dg-bogus "c1typerefs.h:11:18: error: cannot convert 'const 
std::type_info.' to 'const std::type_info.' in initialization" "" { xfail *-*-* 
} 0 }
 
 #include "x1typerefs.h"
 
Index: gcc/testsuite/g++.dg/pph/x1autometh.cc
===================================================================
--- gcc/testsuite/g++.dg/pph/x1autometh.cc      (revision 174789)
+++ gcc/testsuite/g++.dg/pph/x1autometh.cc      (working copy)
@@ -1,6 +1,4 @@
-// { dg-xfail-if "ICE" { "*-*-*" } { "-fpph-map=pph.map" } }
-// { dg-bogus "x1autometh.h:8:1: internal compiler error: Segmentation fault" 
"" { xfail *-*-* } 0 }
-// { dg-prune-output "In file included from " }
+// pph asm xdiff
 
 #include "x1autometh.h"
 
Index: gcc/testsuite/g++.dg/pph/x1special.cc
===================================================================
--- gcc/testsuite/g++.dg/pph/x1special.cc       (revision 174789)
+++ gcc/testsuite/g++.dg/pph/x1special.cc       (working copy)
@@ -1,7 +1,3 @@
-// { dg-xfail-if "ICE" { "*-*-*" } { "-fpph-map=pph.map" } }
-// { dg-bogus "x1special.h:10:5: internal compiler error: Segmentation fault" 
"" { xfail *-*-* } 0 }
-// { dg-prune-output "In file included from " }
-
 #include "x1special.h"
 
 B b(1);
Index: gcc/testsuite/g++.dg/pph/x1functions.cc
===================================================================
--- gcc/testsuite/g++.dg/pph/x1functions.cc     (revision 174789)
+++ gcc/testsuite/g++.dg/pph/x1functions.cc     (working copy)
@@ -1,8 +1,5 @@
-// { dg-xfail-if "ERROR" { "*-*-*" } { "-fpph-map=pph.map" } }
+// { dg-xfail-if "BOGUS" { "*-*-*" } { "-fpph-map=pph.map" } }
 // { dg-bogus "'mbr_decl_inline' was not declared in this scope" "" { xfail 
*-*-* } 0 }
-// { dg-prune-output "In file included from " }
-// { dg-prune-output "In member function " }
-// { dg-prune-output "At global scope:" }
 
 #include "x1functions.h"
 
Index: gcc/testsuite/g++.dg/pph/x1template.cc
===================================================================
--- gcc/testsuite/g++.dg/pph/x1template.cc      (revision 174789)
+++ gcc/testsuite/g++.dg/pph/x1template.cc      (working copy)
@@ -1,5 +1,5 @@
 // { dg-xfail-if "ICE" { "*-*-*" } { "-fpph-map=pph.map" } }
-// { dg-bogus "x1template.h:18:13: internal compiler error: in resume_scope, 
at cp/name-lookup.c:1567" "" { xfail *-*-* } 0 }
+// { dg-bogus "x1template.h:18:13: internal compiler error: in resume_scope, 
at cp/name-lookup.c:1569" "" { xfail *-*-* } 0 }
 // { dg-prune-output "In file included from " }
 
 #include "x1template.h"
Index: gcc/testsuite/g++.dg/pph/x1tmplclass.cc
===================================================================
--- gcc/testsuite/g++.dg/pph/x1tmplclass.cc     (revision 174789)
+++ gcc/testsuite/g++.dg/pph/x1tmplclass.cc     (working copy)
@@ -1,6 +1,5 @@
-// { dg-xfail-if "ICE" { "*-*-*" } { "-fpph-map=pph.map" } }
-// { dg-bogus "x1tmplclass.h:14:17: internal compiler error: Segmentation 
fault" "" { xfail *-*-* } 0 }
-// { dg-prune-output "In file included from " }
+// { dg-xfail-if "BOGUS" { "*-*-*" } { "-fpph-map=pph.map" } }
+// { dg-bogus "x1tmplclass.h:14:5: error: specializing member 
.wrapper<char>::cache. requires .template<>. syntax" "" { xfail *-*-* } 0 }
 
 #include "x1tmplclass.h"
 
Index: gcc/testsuite/g++.dg/pph/x1variables.cc
===================================================================
--- gcc/testsuite/g++.dg/pph/x1variables.cc     (revision 174789)
+++ gcc/testsuite/g++.dg/pph/x1variables.cc     (working copy)
@@ -1,7 +1,6 @@
 // { dg-xfail-if "BOGUS" { "*-*-*" } { "-fpph-map=pph.map" } }
-// { dg-bogus "c1variables.h:4:8: error: 'int D::mbr_uninit_plain' is not a 
static member of 'struct D'" "" { xfail *-*-* } 0 }
-// { dg-bogus "c1variables.h:5:14: error: 'const int D::mbr_init_const' is not 
a static member of 'struct D'" "" { xfail *-*-* } 0 }
-// { dg-prune-output "In file included from " }
+// { dg-bogus "c1variables.h:5:8: error: 'int D::mbr_uninit_plain' is not a 
static member of 'struct D'" "" { xfail *-*-* } 0 }
+// { dg-bogus "c1variables.h:6:14: error: 'const int D::mbr_init_const' is not 
a static member of 'struct D'" "" { xfail *-*-* } 0 }
 
 #include "x1variables.h"
 

--
This patch is available for review at http://codereview.appspot.com/4572050

Reply via email to