aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/cond2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/cond2.C')
-rw-r--r--gcc/testsuite/g++.dg/parse/cond2.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/cond2.C b/gcc/testsuite/g++.dg/parse/cond2.C
new file mode 100644
index 00000000000..2dbe42b34f3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/cond2.C
@@ -0,0 +1,14 @@
+// PR c++/20905
+
+struct name {};
+
+int
+f ();
+
+void
+g ()
+{
+ if (int name = f ())
+ {
+ }
+}