From: Aldy Hernandez Date: Tue, 27 Oct 2020 06:29:42 +0000 (+0100) Subject: Add test for pr97560. X-Git-Tag: upstream/12.2.0~12550 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18cb6195fda69ea8ab8b8a5290dd8c9f8d52b0e6;p=platform%2Fupstream%2Fgcc.git Add test for pr97560. gcc/testsuite/ChangeLog: PR tree-optimization/97560 * g++.dg/pr97560.C: New test. --- diff --git a/gcc/testsuite/g++.dg/pr97560.C b/gcc/testsuite/g++.dg/pr97560.C new file mode 100644 index 0000000..f9e7edf --- /dev/null +++ b/gcc/testsuite/g++.dg/pr97560.C @@ -0,0 +1,44 @@ +// { dg-do compile } +// { dg-options "-O2 -fno-tree-forwprop -fnon-call-exceptions" } + +template +struct pv; + +template +struct pv { + typedef CY g7; +}; + +template +typename pv::g7 hq (Q6 &&lb) +{ + return static_cast::g7 &&> (lb); +} + +struct fk { + fk *j6; + fk *od; +}; + +fk *qi; + +struct xz : fk { + xz (xz &&) + { + qi = this; + + if (j6) + od = this; + } +}; + +struct el { + struct { + xz ls; + } eu; +}; + +struct be : el { +}; + +be l1 = hq (l1);