From patchwork Tue Dec 19 10:36:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 850759 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-469528-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="p4yTasJU"; dkim-atps=neutral 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 3z1DqS1VXTz9s83 for ; Tue, 19 Dec 2017 21:37:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=JLQITUjdZ2kzoJEm6yKpxPAJnIhCd2+vC/JuLXUgq0YEs8UCRh wSbwH16rqgw0Q69penf48uvxy6dvtAIQWJbJZeRGOrryMTchl/jNG/1BnErxBgMC lJBVX9hdjwet8ubRyp8NY7qvXh8jTAclznVb6F1a2E7N064+tJQhCuurg= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=YTS3d5wG0OW0N0i2CKUtevDHZbs=; b=p4yTasJUXiB4rIe+DGw0 QzvABnY3lV5u++he099zwSKwc0oHSREVpbg8MnUhNldDHsw1b98WhfknFd5ZRWFQ ptC8gbJq1/ChImlyzqh76GLc6W0RH0lyKeDUxl66qh18s4qWtcg/S2NUvqYDWsxU ayDZJOTIyyYBCjG9r6k7w0o= Received: (qmail 54426 invoked by alias); 19 Dec 2017 10:36:58 -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 54415 invoked by uid 89); 19 Dec 2017 10:36:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: aserp2130.oracle.com Received: from aserp2130.oracle.com (HELO aserp2130.oracle.com) (141.146.126.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Dec 2017 10:36:56 +0000 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBJAZinW145725; Tue, 19 Dec 2017 10:36:54 GMT Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2ey15b006w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Dec 2017 10:36:54 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vBJAaqaA022139 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Dec 2017 10:36:53 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vBJAapk6003863; Tue, 19 Dec 2017 10:36:52 GMT Received: from [192.168.1.4] (/87.3.196.15) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Dec 2017 02:36:51 -0800 To: "gcc-patches@gcc.gnu.org" Cc: Jakub Jelinek , Richard Guenther From: Paolo Carlini Subject: [middle-end, trivial?] Use error_operand_p in gimplify_expr Message-ID: <8a954162-20ad-925b-e0cd-6a14eca3b210@oracle.com> Date: Tue, 19 Dec 2017 11:36:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8749 signatures=668649 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=849 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712190154 X-IsSubscribed: yes Hi, was working on a couple of bugs and noticed what looks like a case of error_operand_p with a redundant check that TREE_TYPE is non-null. Barring objections I'm going to commit the below. Thanks, Paolo. /////////////////////// 2017-19-12 Paolo Carlini * gimplify.c (gimplify_expr): Use error_operand_p. Index: gimplify.c =================================================================== --- gimplify.c (revision 255811) +++ gimplify.c (working copy) @@ -11334,9 +11334,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gi save_expr = *expr_p; /* Die, die, die, my darling. */ - if (save_expr == error_mark_node - || (TREE_TYPE (save_expr) - && TREE_TYPE (save_expr) == error_mark_node)) + if (error_operand_p (save_expr)) { ret = GS_ERROR; break;