From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1868 invoked by alias); 21 Feb 2018 03:42:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 1836 invoked by uid 89); 21 Feb 2018 03:42:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Feb 2018 03:42:29 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B03A28553C; Wed, 21 Feb 2018 03:42:27 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-67.rdu2.redhat.com [10.10.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7394B5D9C8; Wed, 21 Feb 2018 03:42:26 +0000 (UTC) Subject: Re: [PATCH] Fix pdftex miscompilation due to get_range_strlen (PR tree-optimization/84478) To: Martin Sebor , Jakub Jelinek , Richard Biener Cc: gcc-patches@gcc.gnu.org References: <20180220171712.GH5867@tucnak> From: Jeff Law Message-ID: <81160947-e11f-8b37-440d-8f4221eb7a6d@redhat.com> Date: Wed, 21 Feb 2018 03:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg01212.txt.bz2 On 02/20/2018 12:03 PM, Martin Sebor wrote: >> The thing that isn't handled conservatively is PHIs and COND_EXPR. >> The current code, if we can't figure one of the args out, for PHIs in >> fuzzy mode increases the *maxval value to +INF, but doesn't touch >> *minval, for COND_EXPR doesn't adjust the *minval/*maxval at all and just >> returns false.  Unfortunately, changing that breaks > > It sounds like not setting *minlen is the problem then.  Attached > is a slightly smaller patch that fixes the bug with no testsuite > regressions on x86_64-linux.  How does it look to you? What I don't like here is that we ultimately continue to use the two operand get_range_strlen from the folder. Meaning we're asking for fuzzy results in a code generation path. I'd lean more towards a solution that always gives conservatively correct results in the codegen path while allowing fuzzy on the warning paths. Jeff