From patchwork Fri Apr 5 08:29:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 234065 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 884072C00AC for ; Fri, 5 Apr 2013 19:29:37 +1100 (EST) 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:date:message-id:subject:from:to:content-type; q= dns; s=default; b=DsZp99OaX3md/1o09wkmhjFkIbpkPbw9Sn39bz/UIPNuXp 6ghFz8I/KIDOvfqrS8qssnse3r4Q2Ax+JZQprGTJWtWrw0q3uwchNT9tLf+m0PNx CjQQSxAVa1DUMWUogshx9hMv9r2TkhDKd9YHEj4LpdqgyS4ybbfAxPCrlrNM4= 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:date:message-id:subject:from:to:content-type; s= default; bh=NmaoQnvzUIPxfajlj2fUL3J8MVo=; b=GVdiK9fs9dvLr56u6+Sb +xfEMFAQPcAA+2fNhzbqO5RGzihf0Cka6dLggo4Nvo2P7Kc0o9gdGOKbE7TaHTb3 Slej5XZuMkSTNENKyZhV7ETe6WWgqKfre7XrEdrDm8gVGEgP0j35RNosnLYdc+dV Ne7+XlKmgdUl41HTBoCwzH4= Received: (qmail 689 invoked by alias); 5 Apr 2013 08:29:28 -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 679 invoked by uid 89); 5 Apr 2013 08:29:28 -0000 X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.1 Received: from mail-ie0-f179.google.com (HELO mail-ie0-f179.google.com) (209.85.223.179) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 05 Apr 2013 08:29:25 +0000 Received: by mail-ie0-f179.google.com with SMTP id k11so3992880iea.38 for ; Fri, 05 Apr 2013 01:29:24 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.209.4 with SMTP id mi4mr985157igc.40.1365150563732; Fri, 05 Apr 2013 01:29:23 -0700 (PDT) Received: by 10.64.14.129 with HTTP; Fri, 5 Apr 2013 01:29:23 -0700 (PDT) Date: Fri, 5 Apr 2013 10:29:23 +0200 Message-ID: Subject: [patch tree-ssa-structalias.c]: Small finding in find_func_aliases function From: Kai Tietz To: GCC Patches Hello, while debugging I made the finding that in find_func_aliases rhsop might be used as NULL for gimple_assign_single_p items. It should be using for the gimple_assign_single_p instead directly the rhs1-item as argument to pass to get_constraint_for_rhs function. ChangeLog 2013-04-05 Kai Tietz * tree-ssa-structalias.c (find_func_aliases): Special-case gimple_assign_single_p handling. Ok for apply? Regards, Kai Index: tree-ssa-structalias.c =================================================================== --- tree-ssa-structalias.c (Revision 197495) +++ tree-ssa-structalias.c (Arbeitskopie) @@ -4667,9 +4667,10 @@ find_func_aliases (gimple origt) } else if ((CONVERT_EXPR_CODE_P (code) && !(POINTER_TYPE_P (gimple_expr_type (t)) - && !POINTER_TYPE_P (TREE_TYPE (rhsop)))) - || gimple_assign_single_p (t)) + && !POINTER_TYPE_P (TREE_TYPE (rhsop))))) get_constraint_for_rhs (rhsop, &rhsc); + else if (gimple_assign_single_p (t)) + get_constraint_for_rhs (gimple_assign_rhs1 (t), &rhsc); else if (code == COND_EXPR) { /* The result is a merge of both COND_EXPR arms. */