public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ibm/heads/perf)] c++: Add test for PR91607.
@ 2020-03-19 6:08 Jiu Fu Guo
0 siblings, 0 replies; only message in thread
From: Jiu Fu Guo @ 2020-03-19 6:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a258e46458043b11495faef119489a776eb68f60
commit a258e46458043b11495faef119489a776eb68f60
Author: Jason Merrill <jason@redhat.com>
Date: Thu Mar 5 10:11:36 2020 -0500
c++: Add test for PR91607.
PR c++/91607
* g++.dg/cpp0x/constexpr-const3.C: New.
Diff:
---
gcc/testsuite/g++.dg/cpp0x/constexpr-const3.C | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-const3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-const3.C
new file mode 100644
index 00000000000..83e3155c78d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-const3.C
@@ -0,0 +1,12 @@
+// PR c++/91607
+// { dg-do compile { target c++11 } }
+
+enum A { a };
+constexpr A f(const A x) { return x; }
+
+int main()
+{
+ constexpr A a0 = f(a);
+ constexpr A a1 {};
+ constexpr A a2 = f(a1);
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-19 6:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 6:08 [gcc(refs/vendors/ibm/heads/perf)] c++: Add test for PR91607 Jiu Fu Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).