From patchwork Mon Feb 13 11:57:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Kulkarni X-Patchwork-Id: 93845 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1057006qgi; Mon, 13 Feb 2017 03:57:24 -0800 (PST) X-Received: by 10.99.107.130 with SMTP id g124mr26449267pgc.108.1486987044265; Mon, 13 Feb 2017 03:57:24 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o1si9889098pga.82.2017.02.13.03.57.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Feb 2017 03:57:24 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-448397-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-448397-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-448397-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=sCLdwoSAj1/H+OgGfMaKqFuSPYJz8m0JUi56h5XFrGRFG/ +wfIbGN62F5BIrtqAvGy/wVUlaImNsm+LJHVqh5wgzsDb/j2R8zq8HrkOipXWZA6 cnEUuHKJKFe14B6T91Dfyxm3JIQG4592+Wx74RnWu0Lyw8pR8BVmXzRNSRuvI= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=XkmT6PEyUtDXhA4fZVFGRN43BhI=; b=UvYGfElxSlttNM6irGzI i90lqsX/qGqWPNrCzxgV7C5aD8WbmIRc7pzn0g/yzDvDTn6nPotfgNJwKKZ8ofAe rxgNZkCVBR23aV5zXZGmpRh8rfZZHwLkG6qM3/g4dzd3K4dpebJRIjGz/BKEQrG/ MLNVvr64YXTmiKCIE5txDJ4= Received: (qmail 47202 invoked by alias); 13 Feb 2017 11:57:07 -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 47185 invoked by uid 89); 13 Feb 2017 11:57:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:value, Hx-languages-length:938 X-HELO: mail-it0-f49.google.com Received: from mail-it0-f49.google.com (HELO mail-it0-f49.google.com) (209.85.214.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Feb 2017 11:57:05 +0000 Received: by mail-it0-f49.google.com with SMTP id 203so183201706ith.0 for ; Mon, 13 Feb 2017 03:57:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=IbhTjAWOo/1K8dpURAckbdg/Egtt6lLRh75/ifCEmk0=; b=fsX2I/aIgcY+sFbfykVFaptUt3JwayrBZssfmGjPE4tBbGtCzEMbDwTarWcoodFPpp YcdWlUi7KEfRQHfjKSaH9lus3M/iLX97sutQuiwVkijlRqQO+EjcYsgxvJ4kGcf1yodu tReFf48ecpy1v2QlLNkmb/QU51RgXFNABGMykPglwEZT5ZPmc4+06HqPj3jO4mS0fF53 EFv7Wog/a/vdU5JL9B7lgiCJjp0CYYmPSnTXYCoBhW6lBGgNdsfND12NOQ32DYsyRYjQ afpLeDrWQ8Wd94ML69Gwlp4b+9+qW88OL9j8ahLnM6oH7KWlClODQOn9v7CYjlDrFIEs wl+w== X-Gm-Message-State: AMke39niQYRcReSZbL/8i6csjvRa6j33+MTkgFSF0DSRi2TE1AF7l/ostYJ0GzN7HzL4w/CDCN8ZHBdw5Mw+QNnn X-Received: by 10.36.53.210 with SMTP id k201mr19970245ita.21.1486987023702; Mon, 13 Feb 2017 03:57:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.162.13 with HTTP; Mon, 13 Feb 2017 03:57:03 -0800 (PST) From: Prathamesh Kulkarni Date: Mon, 13 Feb 2017 17:27:03 +0530 Message-ID: Subject: PR79478 To: gcc Patches , Richard Biener X-IsSubscribed: yes Hi, As mentioned in PR, the attached patch sets source range when parsing ssa-name in c_parser_gimple_postfix_expression which avoids uninitialized use. Is it OK to commit after bootstrap+test ? Thanks, Prathamesh 2017-02-13 Prathamesh Kulkarni PR c/79478 * gimple-parser.c (c_parser_gimple_postfix_expression): Call set_c_expr_source_range when parsing ssa-name. diff --git a/gcc/c/gimple-parser.c b/gcc/c/gimple-parser.c index 681951c..db7e407 100644 --- a/gcc/c/gimple-parser.c +++ b/gcc/c/gimple-parser.c @@ -863,6 +863,7 @@ c_parser_gimple_postfix_expression (c_parser *parser) c_parser_consume_token (parser); expr.value = c_parser_parse_ssa_name (parser, id, NULL_TREE, version, ver_offset); + set_c_expr_source_range (&expr, tok_range); /* For default definition SSA names. */ if (c_parser_next_token_is (parser, CPP_OPEN_PAREN) && c_parser_peek_2nd_token (parser)->type == CPP_NAME