diff mbox series

[committed] testsuite: Fix up pr99305.C test on unsigned_char targets [PR99498]

Message ID 20210310164313.GZ745611@tucnak
State New
Headers show
Series [committed] testsuite: Fix up pr99305.C test on unsigned_char targets [PR99498] | expand

Commit Message

Jakub Jelinek March 10, 2021, 4:43 p.m. UTC
Hi!

On unsigned_char targets, the cast stmt to unsigned char is obviously
not needed (and shouldn't be there).  But it doesn't hurt to test
the rest also on targets where char is unsigned.

Tested on x86_64-linux and with cross to powerpc64le-linux, committed
to trunk.

2021-03-10  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/99305
	PR testsuite/99498
	* g++.dg/opt/pr99305.C: Don't expect cast to unsigned char on
	unsigned_char effective targets.


	Jakub
diff mbox series

Patch

--- gcc/testsuite/g++.dg/opt/pr99305.C.jj	2021-03-09 19:13:03.359524234 +0100
+++ gcc/testsuite/g++.dg/opt/pr99305.C	2021-03-10 17:31:58.495527765 +0100
@@ -1,7 +1,7 @@ 
 // PR tree-optimization/99305
 // { dg-do compile }
 // { dg-options "-O3 -fno-ipa-icf -fdump-tree-optimized" }
-// { dg-final { scan-tree-dump-times " = \\\(unsigned char\\\) c_\[0-9]*\\\(D\\\);" 3 "optimized" } }
+// { dg-final { scan-tree-dump-times " = \\\(unsigned char\\\) c_\[0-9]*\\\(D\\\);" 3 "optimized" { target { ! unsigned_char } } } }
 // { dg-final { scan-tree-dump-times " = \[^\n\r]* \\+ \[0-9]*;" 3 "optimized" } }
 // { dg-final { scan-tree-dump-times " = \[^\n\r]* <= 9;" 3 "optimized" } }
 // { dg-final { scan-tree-dump-not "if \\\(c_\[0-9]*\\\(D\\\) \[!=]= 0\\\)" "optimized" } }