aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-12-27 16:24:52 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-12-27 16:24:52 +0100
commit749db154bd0d496379afca19ef72c3e121a034bb (patch)
tree60c714b45e2bed985bd4bfc986331f1655a96787 /gcc/testsuite/g++.dg
parent382017a6e89525a531a56ca9b29ea5830ad6dbb0 (diff)
downloadgcc-749db154bd0d496379afca19ef72c3e121a034bb.zip
gcc-749db154bd0d496379afca19ef72c3e121a034bb.tar.gz
gcc-749db154bd0d496379afca19ef72c3e121a034bb.tar.bz2
re PR c++/38639 (ICE with invalid use of auto in parallel for-loop)
PR c++/38639 * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of just its type. * g++.dg/gomp/pr38639.C: New test. From-SVN: r142933
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr38639.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/gomp/pr38639.C b/gcc/testsuite/g++.dg/gomp/pr38639.C
new file mode 100644
index 0000000..1da3cec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr38639.C
@@ -0,0 +1,17 @@
+// PR c++/38639
+// { dg-do compile }
+// { dg-options "-fopenmp -std=c++0x" }
+
+template<int> void
+foo ()
+{
+#pragma omp parallel for
+ for (auto i = i = 0; i<4; ++i) // { dg-error "incomplete|unable|invalid" }
+ ;
+}
+
+void
+bar ()
+{
+ foo<0> (); // { dg-message "instantiated from here" }
+}