From patchwork Thu Dec 3 18:18:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 552404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 486811400CB for ; Fri, 4 Dec 2015 05:18:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=TLo4qfeq; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=Fj28m8EGVwCdPwrXhv9dDw1hD0hzMcV2K7DeVn4r7/ehy5ZtxOVPx pa9Py8TMrq6Nypx1FdJlewdcGZKkTguVZrqMR5MaTyKlucIH54g0gBiDRGeTrhZ7 M6czijoIGFlnEk7PfIfoy0LgGDhySt3bFMsGcViJOBFShoZdsMKVOE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=48G/ICnhMD3wLKuKvBXqnLwchvU=; b=TLo4qfeqr622jfEH5cAQ vU4x49/tgLsWwIRNixcLirV4dMgkoTbRfgAReY/3dSlc261pgmaPV9Z4YT8y88td +OgoRB3R0+KOLF3HwwGu9+r6ygPlst7V4Bik5+CdAqm9orPGe5MV70iyHMX3NLW6 DBcRGnV3crAzKdcU1nPqfsk= Received: (qmail 35020 invoked by alias); 3 Dec 2015 18:18:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 35006 invoked by uid 89); 3 Dec 2015 18:18:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 03 Dec 2015 18:18:46 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 075DAADE2 for ; Thu, 3 Dec 2015 18:18:43 +0000 (UTC) Date: Thu, 3 Dec 2015 19:18:42 +0100 From: Martin Jambor To: GCC Patches Subject: [hsa] Useful checking assert in scan_omp_1_op Message-ID: <20151203181842.GG3155@virgil.suse.cz> Mail-Followup-To: GCC Patches MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes 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 * 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: