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]

Re: [patch] Some testsuite cleanup


On 01/08/16 17:31 +0100, Jonathan Wakely wrote:
On 01/08/16 09:23 -0700, Mike Stump wrote:
On Jul 31, 2016, at 1:30 PM, Jonathan Wakely <jwakely@redhat.com> wrote:

-fno-show-column

is a good general option.  If you guys want to add column number test cases, they can avoid it, and test down to the column.  Most people don't care, and most test aren't interested in column testing anyway.  But, if you want to do a sea change, you can add column numbers to every expected line and that way, they all will fail, if any of the numbers go wrong.  If someone wants to sign up for that, it is slightly better, but requires that someone do all the work.

OK, thanks Mike.

I plan to make this change then (rather than adding it to individual
tests as and when we find one that needs it).

--- a/libstdc++-v3/scripts/testsuite_flags.in
+++ b/libstdc++-v3/scripts/testsuite_flags.in
@@ -56,7 +56,7 @@ case ${query} in
     echo ${CC}
     ;;
   --cxxflags)
-      CXXFLAGS_default="-D_GLIBCXX_ASSERT -fmessage-length=0"
+      CXXFLAGS_default="-D_GLIBCXX_ASSERT -fmessage-length=0 -fno-show-column"
     CXXFLAGS_config="@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@"
     echo ${CXXFLAGS_default} ${CXXFLAGS_config}       ;;

This adds it to the default flags used for the entire libstdc++ testsuite.

I've also added -fno-show-column on the gcc-6-branch, with this patch.
This makes it easier to backport patches from trunk.

commit aa3fdea285ce29a6444efd0fd87008bbaf960332
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Aug 2 19:34:15 2016 +0000

    Add -fno-show-column to libstdc++ test flags
    
    Backport from mainline
    2016-08-02  Jonathan Wakely  <jwakely@redhat.com>
    
    	* scripts/testsuite_flags.in: Add -fno-show-column to cxxflags.
    
    Backport from mainline
    2016-07-27  Jonathan Wakely  <jwakely@redhat.com>
    
    	* testsuite/20_util/forward/1_neg.cc: Move dg-error to right line.

diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in
index ee59167..ea1a464 100755
--- a/libstdc++-v3/scripts/testsuite_flags.in
+++ b/libstdc++-v3/scripts/testsuite_flags.in
@@ -56,7 +56,7 @@ case ${query} in
       echo ${CC}
       ;;
     --cxxflags)
-      CXXFLAGS_default="-D_GLIBCXX_ASSERT -fmessage-length=0"
+      CXXFLAGS_default="-D_GLIBCXX_ASSERT -fmessage-length=0 -fno-show-column"
       CXXFLAGS_config="@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@"
       echo ${CXXFLAGS_default} ${CXXFLAGS_config} 
       ;;
diff --git a/libstdc++-v3/testsuite/20_util/forward/1_neg.cc b/libstdc++-v3/testsuite/20_util/forward/1_neg.cc
index d2f3477..46ba96c 100644
--- a/libstdc++-v3/testsuite/20_util/forward/1_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/forward/1_neg.cc
@@ -27,8 +27,8 @@ template<class T, class A1, class A2>
   std::shared_ptr<T>
   factory(A1&& a1, A2&& a2)
   {
-    return std::shared_ptr<T>(new T(std::forward<A1>(a1),
-				    std::forward<A2>(a2))); // { dg-error "rvalue" }
+    return std::shared_ptr<T>(new T(std::forward<A1>(a1), // { dg-error "rvalue" }
+				    std::forward<A2>(a2)));
   }
 
 struct A

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