diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-27 15:24:52 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-27 15:24:52 +0000 |
commit | 866389a0b15252ae76f322ba45a67a5f0c289e9a (patch) | |
tree | 60c714b45e2bed985bd4bfc986331f1655a96787 /gcc/testsuite/g++.dg/gomp | |
parent | 29380f16cf65b96761f690399f5cc82e2976dcb3 (diff) | |
download | gcc-866389a0b15252ae76f322ba45a67a5f0c289e9a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/gomp')
-rw-r--r-- | gcc/testsuite/g++.dg/gomp/pr38639.C | 17 |
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 00000000000..1da3cecdf07 --- /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" } +} |