Address UNRESOLVED for 'g++.dg/tree-ssa/empty-loop.C' (was: optimize basic_string)
Checks
Commit Message
Hi!
On 2024-11-26T16:43:07+0100, Jan Hubicka <hubicka@ucw.cz> wrote:
> I also noticed that this patch trigger empty-loop.C failure which I
> originaly attributed to different change. I filled PR117764 on that.
> We are no longer able to eliminate empty loops early, but we still
> optimize them late.
> --- a/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C
> +++ b/gcc/testsuite/g++.dg/tree-ssa/empty-loop.C
> @@ -30,5 +30,8 @@ int foo (vector<string> &v, list<string> &l, set<string> &s, map<int, string> &m
>
> return 0;
> }
> -/* { dg-final { scan-tree-dump-not "if" "cddce2"} } */
> +/* Adding __builtin_unreachable to std::string::size() prevents cddce2 from
> + eliminating the loop early, see PR117764. */
> +/* { dg-final { scan-tree-dump-not "if" "cddce2" { xfail *-*-* } } } */
> +/* { dg-final { scan-tree-dump-not "if" "cddce3"} } */
Pushed to trunk branch commit 3e8d3079c31567d3e9f43cc2cb100ddef25f48a2
"Address UNRESOLVED for 'g++.dg/tree-ssa/empty-loop.C'", see attached.
Grüße
Thomas
From 3e8d3079c31567d3e9f43cc2cb100ddef25f48a2 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tschwinge@baylibre.com>
Date: Thu, 28 Nov 2024 14:31:17 +0100
Subject: [PATCH] Address UNRESOLVED for 'g++.dg/tree-ssa/empty-loop.C'
As of commit 1046c32de4956c3d706a2ff8683582fd21b8f360 "optimize basic_string",
we've got:
PASS: g++.dg/tree-ssa/empty-loop.C -std=gnu++17 (test for excess errors)
[-PASS:-]{+XFAIL:+} g++.dg/tree-ssa/empty-loop.C -std=gnu++17 scan-tree-dump-not cddce2 "if"
{+UNRESOLVED: g++.dg/tree-ssa/empty-loop.C -std=gnu++17 scan-tree-dump-not cddce3 "if"+}
[Etc.]
gcc/testsuite/
* g++.dg/tree-ssa/empty-loop.C: Address UNRESOLVED.
---
gcc/testsuite/g++.dg/tree-ssa/empty-loop.C | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cddce2 -ffinite-loops -Wno-unused-result" } */
+/* { dg-options "-O2 -ffinite-loops -Wno-unused-result" } */
+/* { dg-additional-options "-fdump-tree-cddce2 -fdump-tree-cddce3" } */
/* { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } */
#include <string>
--
2.34.1