From patchwork Thu Jan 5 13:26:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 134470 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 1CB051007D6 for ; Fri, 6 Jan 2012 00:26:35 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1326374797; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Date: From:To:Subject:Message-ID:User-Agent:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=HmJqqEy44+/0aDZnqwtY rj3yvJo=; b=J7NXRfsRXpyn7/vpNYwDVHxcsS0zZUGmJq4ekS8a16VM/4c40w9a neAVUWbkZB0S2kRTp0eNo5dLLGIE+5mdJall/Cr5Em5p+lVHdslE20J4vJtzcd0y Pp+HbeGrOaMyxsAPz1VHaPSfTpA+LclXI5VmLQqBafWss7oYoXSrLy8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Date:From:To:Subject:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=XGlLyYg4+YRgIimc15hbfT/YtKlPf17N3Tggux7jT+yUbt6KXFSffF75sWhO0P UpcvZJg7lKE+1Ow1k9SRw0E/pKW/V1BiGT+KPI1hraBmi6HrsYOcQ67xsG9C0ndJ KNoSS49FiMtvjug6r+UShiAHba8cj8gwwV2CNrMX6xOPQ=; Received: (qmail 5535 invoked by alias); 5 Jan 2012 13:26:31 -0000 Received: (qmail 5525 invoked by uid 22791); 5 Jan 2012 13:26:30 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Jan 2012 13:26:17 +0000 Received: from relay1.suse.de (nat.nue.novell.com [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id EC6AC8A908 for ; Thu, 5 Jan 2012 14:26:15 +0100 (CET) Date: Thu, 5 Jan 2012 14:26:15 +0100 (CET) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] testcase for PR41576 Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 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 Which was fixed in 4.6 already. We only warn for type mismatches for symbols in different TUs if they are not structurally compatible. Richard. 2012-01-05 Richard Guenther PR lto/41576 * gfortran.dg/lto/pr41576_0.f90: New testcase. * gfortran.dg/lto/pr41576_1.f90: Likewise. Index: gcc/testsuite/gfortran.dg/lto/pr41576_0.f90 =================================================================== --- gcc/testsuite/gfortran.dg/lto/pr41576_0.f90 (revision 0) +++ gcc/testsuite/gfortran.dg/lto/pr41576_0.f90 (revision 0) @@ -0,0 +1,10 @@ +! { dg-lto-do run } +! { dg-lto-options { { -O2 -flto -Werror } } } + +subroutine foo + common /bar/ a, b + integer(4) :: a ,b + a = 1 + b = 2 +end + Index: gcc/testsuite/gfortran.dg/lto/pr41576_1.f90 =================================================================== --- gcc/testsuite/gfortran.dg/lto/pr41576_1.f90 (revision 0) +++ gcc/testsuite/gfortran.dg/lto/pr41576_1.f90 (revision 0) @@ -0,0 +1,7 @@ +program test + common /bar/ c, d + integer(4) :: c, d + call foo + if (c/=1 .or. d/=2) call abort +end program test +