From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7808 invoked by alias); 7 Jul 2011 19:53:21 -0000 Received: (qmail 7791 invoked by uid 22791); 7 Jul 2011 19:53:20 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Jul 2011 19:53:06 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 533E6CB02D1; Thu, 7 Jul 2011 21:53:05 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xbwit6huYf+0; Thu, 7 Jul 2011 21:52:55 +0200 (CEST) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 06513CB01FC; Thu, 7 Jul 2011 21:52:55 +0200 (CEST) From: Eric Botcazou To: Kirill Yukhin Subject: Re: [PATCH, testsuite] Fix for PR49519, miscompiled 447.dealII in SPEC CPU 2006 Date: Thu, 07 Jul 2011 19:56:00 -0000 User-Agent: KMail/1.9.9 Cc: gcc-patches@gcc.gnu.org, rguenther@suse.de, "H.J. Lu" References: <201107062136.21937.ebotcazou@adacore.com> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201107072152.32206.ebotcazou@adacore.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2011-07/txt/msg00551.txt.bz2 > ChangeLog entry: > 2011-07-06 Kirill Yukhin > > PR middle-end/49519 > * calls.c (mem_overlaps_already_clobbered_arg_p): Additional > check if address is stored in register. If so - give up. > (check_sibcall_argument_overlap_1): Do not perform check of > overlapping when it is call to address. > > tessuite/ChangeLog entry: > 2011-07-06 Kirill Yukhin > > * g++.dg/torture/pr49519.C: New test for tailcall fix. New test is sufficient. > Bootstrapped, new test fails without patch, passes when it is applied. > This fixes the problem with SPEC2006/447.dealII miscompile OK, modulo a few nits: + /* If address come in register - we have no idea of its origin, so + give up and conservatively return true */ + else if (GET_CODE (addr) == REG) /* If the address comes in a register, we have no idea of its origin so give up and conservatively return true. */ Note the period-double-space-star-slash GNUism at the end. Non-negotiable. + /* We do not check arguments of call expression */ + if (code == CALL) + return 0; Nice ambiguity, the entire machinery is about checking arguments of calls. :-) /* We need not check the operands of the CALL expresion itself. */ No need to retest, just make sure the changes compile (e.g. type 'make' from within the gcc/ directory of a bootstrap tree) and commit. Thanks for fixing the bug. -- Eric Botcazou