Message ID | 52A114A1.8010504@net-b.de |
---|---|
State | New |
Headers | show |
Tobias Burnus wrote: > A rather simple fix for an ICE on invalid bug (low-priority 4.8/4.9 > regression). > > Bootstrapped and regtested without new failure on x86-64-gnu-linux. > OK for the trunk and 4.8? > > Tobias
*ping* http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00584.html On December 6, 2013, Tobias Burnus wrote: > A rather simple fix for an ICE on invalid bug (low-priority 4.8/4.9 > regression). > > Bootstrapped and regtested without new failure on x86-64-gnu-linux. > OK for the trunk and 4.8? > > Tobias
* ping * Tobias Burnus wrote: > *ping* > http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00584.html > > On December 6, 2013, Tobias Burnus wrote: >> A rather simple fix for an ICE on invalid bug (low-priority 4.8/4.9 >> regression). >> >> Bootstrapped and regtested without new failure on x86-64-gnu-linux. >> OK for the trunk and 4.8? >> >> Tobias > >
*ping* - I think the patch is nearly obvious … http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00584.html On December 6, 2013, Tobias Burnus wrote: > A rather simple fix for an ICE on invalid bug (low-priority 4.8/4.9 > regression). > > Bootstrapped and regtested without new failure on x86-64-gnu-linux. > OK for the trunk and 4.8? > > Tobias
On 01/02/2014 03:47 PM, Tobias Burnus wrote:
> http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00584.html
OK, but please also check init for error_mark_node.
Jason
2013-06-12 Tobias Burnus <burnus@net-b.de> PR c++/58567 * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node. 2013-06-12 Tobias Burnus <burnus@net-b.de> PR c++/58567 * g++.dg/gomp/pr58567.C: New. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 25d940c..ddc7112 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13035,6 +13035,10 @@ tsubst_omp_for_iterator (tree t, int i, tree declv, tree initv, init_decl = (init && TREE_CODE (init) == DECL_EXPR); init = RECUR (init); decl = RECUR (decl); + + if (decl == error_mark_node) + return; + if (init_decl) { gcc_assert (!processing_template_decl); diff --git a/gcc/testsuite/g++.dg/gomp/pr58567.C b/gcc/testsuite/g++.dg/gomp/pr58567.C new file mode 100644 index 0000000..35a5bb0 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr58567.C @@ -0,0 +1,15 @@ +/* { dg-do compile } */ + +/* PR c++/58567 - was ICEing before */ + +template<typename T> void foo() +{ + #pragma omp parallel for + for (typename T::X i = 0; i < 100; ++i) /* { dg-error "'int' is not a class, struct, or union type|expected iteration declaration or initialization" } */ + ; +} + +void bar() +{ + foo<int>(); +}