Address UNRESOLVED for 'g++.dg/tree-ssa/empty-loop.C' (was: optimize basic_string)

Thomas Schwinge tschwinge@baylibre.com
Thu Nov 28 13:44:23 GMT 2024


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Address-UNRESOLVED-for-g-.dg-tree-ssa-empty-loop.C.patch
Type: text/x-diff
Size: 1384 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20241128/3221084f/attachment.bin>


More information about the Libstdc++ mailing list