[PATCH] Adjust PR63184 testcases

Richard Biener rguenther@suse.de
Thu Dec 6 10:33:00 GMT 2018


Committed.

2018-12-06  Richard Biener  <rguenther@suse.de>

	PR middle-end/63184
	* c-c++-common/pr19807-2.c: Try link only on x86, add xfailed
	optimized dump scanning.
	* c-c++-common/pr19807-3.c: Likewise.

diff --git a/gcc/testsuite/c-c++-common/pr19807-2.c b/gcc/testsuite/c-c++-common/pr19807-2.c
index c8b2a57d654..d2c010140d0 100644
--- a/gcc/testsuite/c-c++-common/pr19807-2.c
+++ b/gcc/testsuite/c-c++-common/pr19807-2.c
@@ -1,5 +1,6 @@
-/* { dg-do link } */
-/* { dg-options "-O" } */
+/* Some targets can optimize this on RTL.  */
+/* { dg-do link { target { x86_64-*-* i?86-*-* } } } */
+/* { dg-options "-O -fdump-tree-optimized" } */
 
 extern void link_error(void);
 int i;
@@ -10,3 +11,5 @@ int main()
     link_error();
   return 0;
 }
+
+/* { dg-final { scan-tree-dump-not "link_error" "optimized" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/pr19807-3.c b/gcc/testsuite/c-c++-common/pr19807-3.c
index d882bd369bf..bb7f9827725 100644
--- a/gcc/testsuite/c-c++-common/pr19807-3.c
+++ b/gcc/testsuite/c-c++-common/pr19807-3.c
@@ -1,5 +1,6 @@
-/* { dg-do link } */
-/* { dg-options "-O" } */
+/* Some targets can optimize this on RTL.  */
+/* { dg-do link { target { x86_64-*-* i?86-*-* } } } */
+/* { dg-options "-O -fdump-tree-optimized" } */
 
 extern void link_error(void);
 int i;
@@ -10,3 +11,5 @@ int main()
     link_error();
   return 0;
 }
+
+/* { dg-final { scan-tree-dump-not "link_error" "optimized" { xfail *-*-* } } } */



More information about the Gcc-patches mailing list