Hi,

I have found that adding the following checking assert very useful
when debugging omp lowering issues, so I have added it to the hsa
branch.  I hope that nobody will mind, but it of course is not an
essential thing to have if someone does.

Thanks,

Martin

2015-12-03  Martin Jambor  <mjam...@suse.cz>

        * omp-low.c (scan_omp_1_op): Add checking assert that we are not
        re-mapping to ERROR_MARK.
---
 gcc/omp-low.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 8854df7..05d8901 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -3731,7 +3731,11 @@ scan_omp_1_op (tree *tp, int *walk_subtrees, void *data)
     case LABEL_DECL:
     case RESULT_DECL:
       if (ctx)
-       *tp = remap_decl (t, &ctx->cb);
+       {
+         tree repl = remap_decl (t, &ctx->cb);
+         gcc_checking_assert (TREE_CODE (repl) != ERROR_MARK);
+         *tp = repl;
+       }
       break;
 
     default:
-- 
2.6.3

Reply via email to