From patchwork Sat Dec 18 12:50:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 76069 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]) by ozlabs.org (Postfix) with SMTP id 4A158B70A9 for ; Sat, 18 Dec 2010 23:53:04 +1100 (EST) Received: (qmail 664 invoked by alias); 18 Dec 2010 12:53:01 -0000 Received: (qmail 647 invoked by uid 22791); 18 Dec 2010 12:53:00 -0000 X-SWARE-Spam-Status: No, hits=-2.0 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; Sat, 18 Dec 2010 12:52:53 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 97504CB02AE for ; Sat, 18 Dec 2010 13:52:51 +0100 (CET) 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 FzPHOKw3hKe1 for ; Sat, 18 Dec 2010 13:52:51 +0100 (CET) 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 769DCCB023E for ; Sat, 18 Dec 2010 13:52:51 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix PR tree-opt/46232 Date: Sat, 18 Dec 2010 13:50:59 +0100 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201012181350.59835.ebotcazou@adacore.com> 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 As diagnosed in the audit trail, the recent introduction of MEM_REF in the SRA pass can generate "spurious" address-of operators in the dumps, which breaks the pattern matching in gcc.dg/tree-ssa/pr14814.c on e.g. SPARC 64-bit. The attached patchlet adds -fno-tree-sra to the testcase; this is orthogonal to the original problem. Tested on i586-suse-linux and sparc64-sun-solaris2.9 applied on the mainline as obvious. 2010-12-18 Eric Botcazou PR tree-optimization/46232 * gcc.dg/tree-ssa/pr14814.c: Add -fno-tree-sra. Index: gcc.dg/tree-ssa/pr14814.c =================================================================== --- gcc.dg/tree-ssa/pr14814.c (revision 167901) +++ gcc.dg/tree-ssa/pr14814.c (working copy) @@ -1,6 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-forwprop2" } */ - +/* { dg-options "-O2 -fno-tree-sra -fdump-tree-forwprop2" } */ struct YY { double e[3]; }; @@ -21,5 +20,3 @@ int foo(const struct XX* r) { /* { dg-final { scan-tree-dump-times "&" 0 "forwprop2" } } */ /* { dg-final { cleanup-tree-dump "forwprop2" } } */ - -