40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
From a5f67f524a04353cc67d52c4b333a8e58ebcdd54 Mon Sep 17 00:00:00 2001
|
|
From: Jakub Jelinek <jakub@redhat.com>
|
|
Date: Wed, 10 Mar 2021 17:40:25 +0100
|
|
Subject: [PATCH 17/26] testsuite: Fix up pr99305.C test on unsigned_char
|
|
targets [PR99498]
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
Reference commit in GCC: 5bf998275aff311b9804c1de944a88c219f35db6
|
|
Signed-off-by: Pronin Alexander 00812787 <pronin.alexander@huawei.com>
|
|
---
|
|
gcc/testsuite/g++.dg/opt/pr99305.C | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/gcc/testsuite/g++.dg/opt/pr99305.C b/gcc/testsuite/g++.dg/opt/pr99305.C
|
|
index 8a91277e7..6fcdef391 100644
|
|
--- a/gcc/testsuite/g++.dg/opt/pr99305.C
|
|
+++ b/gcc/testsuite/g++.dg/opt/pr99305.C
|
|
@@ -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" } }
|
|
--
|
|
2.27.0
|
|
|