diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-12 21:50:12 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-12 21:50:12 +0000 |
commit | eed21ac462e193944bf1fec42d7739f8b7a5622c (patch) | |
tree | 1f0a6098fda104214d7e0b892aa8b56fe5d198df /gcc/cp/semantics.c | |
parent | bb55448e78cea451b158cc86107b2379984faf30 (diff) | |
download | gcc-eed21ac462e193944bf1fec42d7739f8b7a5622c.tar.gz |
/cp
2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59628
* semantics.c (finish_omp_reduction_clause): Early return true
if DECL_SAVED_TREE (id) is NULL_TREE.
/testsuite
2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59628
* g++.dg/gomp/pr59628.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218692 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 8a1de7e095c..5ad391eda5b 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -5138,6 +5138,8 @@ finish_omp_reduction_clause (tree c, bool *need_default_ctor, bool *need_dtor) id = OVL_CURRENT (id); mark_used (id); tree body = DECL_SAVED_TREE (id); + if (!body) + return true; if (TREE_CODE (body) == STATEMENT_LIST) { tree_stmt_iterator tsi; |