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]

[C++ PATCH] Some check-c++-all fixes


Hi!

In make check-c++-all I've noticed some UNSUPPORTED tests and some
failures, the following patch attempts to fix those.
The failures are due to new not emitting operator new (...) != NULL
comparison with -std=c++17 anymore, so there is nothing to fold away
(first 2 hunks).  The rest is about tests which are dg-do run, but
for -std=c++17 and above contain dg-error and thus the execution test
part is UNSUPPORTED.

Regtested with make check-c++-all on x86_64-linux and i686-linux, ok for
trunk?

2017-09-19  Jakub Jelinek  <jakub@redhat.com>

	* g++.dg/tree-ssa/pr31146-2.C: Only do scan-tree-dump for c++14_down.
	* g++.dg/tree-ssa/pr41428.C: Likewise.
	* g++.dg/expr/bool1.C: Only do dg-do compile instead of dg-do run for
	c++17 and up.
	* g++.dg/expr/bool3.C: Likewise.
	* g++.dg/expr/bitfield5.C: Likewise.
	* g++.old-deja/g++.jason/bool5.C: Likewise.

--- gcc/testsuite/g++.dg/tree-ssa/pr41428.C.jj	2015-05-29 15:04:33.000000000 +0200
+++ gcc/testsuite/g++.dg/tree-ssa/pr41428.C	2017-09-19 14:23:13.366127516 +0200
@@ -11,4 +11,6 @@ int foo(void)
   return *(int *)&f;
 }
 
-/* { dg-final { scan-tree-dump "Folded into: if \\\(1 != 0\\\)" "ccp1" } } */
+/* -std=c++17 and above doesn't emit operator new () != NULL, so there is
+   nothing to fold anymore.  */
+/* { dg-final { scan-tree-dump "Folded into: if \\\(1 != 0\\\)" "ccp1" { target c++14_down } } } */
--- gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C.jj	2016-09-21 08:54:09.000000000 +0200
+++ gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C	2017-09-19 14:23:41.675773292 +0200
@@ -20,4 +20,6 @@ double foo (void)
   return v.a[2];
 }
 
-/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" } } */
+/* -std=c++17 and above doesn't emit operator new () != NULL, so there is
+   nothing to fold anymore.  */
+/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" { target c++14_down } } } */
--- gcc/testsuite/g++.dg/expr/bool1.C.jj	2017-09-15 18:11:05.000000000 +0200
+++ gcc/testsuite/g++.dg/expr/bool1.C	2017-09-19 14:16:46.139972669 +0200
@@ -1,5 +1,6 @@
-// { dg-do run }
-// PR C++/29295
+// PR c++/29295
+// { dg-do run { target c++14_down } }
+// { dg-do compile { target c++17 } }
 // make sure that a typedef for a bool will have the
 //  the same results as a bool itself.
 
--- gcc/testsuite/g++.dg/expr/bool3.C.jj	2017-09-15 18:11:05.000000000 +0200
+++ gcc/testsuite/g++.dg/expr/bool3.C	2017-09-19 14:16:40.439044001 +0200
@@ -1,5 +1,6 @@
-// { dg-do run }
-// PR C++/29295
+// PR c++/29295
+// { dg-do run { target c++14_down } }
+// { dg-do compile { target c++17 } }
 // make sure that a typedef for a bool will have the
 //  the same results as a bool itself.
 
--- gcc/testsuite/g++.dg/expr/bitfield5.C.jj	2017-09-15 18:11:05.000000000 +0200
+++ gcc/testsuite/g++.dg/expr/bitfield5.C	2017-09-19 14:12:40.087051397 +0200
@@ -1,5 +1,6 @@
 // PR c++/30274
-// { dg-do run }
+// { dg-do run { target c++14_down } }
+// { dg-do compile { target c++17 } }
 
 struct S {
   bool x : 4;
--- gcc/testsuite/g++.old-deja/g++.jason/bool5.C.jj	2017-09-15 18:11:08.000000000 +0200
+++ gcc/testsuite/g++.old-deja/g++.jason/bool5.C	2017-09-19 14:17:19.708552643 +0200
@@ -1,4 +1,5 @@
-// { dg-do run  }
+// { dg-do run { target c++14_down } }
+// { dg-do compile { target c++17 } }
 int main ()
 {
   bool b = false;

	Jakub


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