From patchwork Thu Feb 6 10:43:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janus Weil X-Patchwork-Id: 317414 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2D4472C0326 for ; Thu, 6 Feb 2014 21:43:29 +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=BAqvoLTC/L13q8tTps52rG8uuzY9wjZclIib3VqT8w5R27 eOXdxWZpR/9eh8K2ZgsamX20BHnvOZDeDJVpRu1tWyosF8uxj4WXmnYx3h0FayAF f6r8mR2+Mz72Ph3MjL4MthSXplroZCM4VJjxwHKDeNAeHv9oVm7xNFYdmO7es= 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=PRxZCy5Ju3DCWQErTTqV+r+giSU=; b=Ubel5DUwiAqPyb3/QnRP ughvYnxMlzgyAZ6QNyBdL/SGz3Iawgal7MlDq54Qm7g8nx8+kiODKQ6tzvuSTnfN v1udEe1kKmV2kFwJLnKunWUNqxtATsLBpwmwvKL7aJfRV32qvBMrunUlRdo/uslX 5wvfTuymM9I5PwVjkkkcM30= Received: (qmail 14823 invoked by alias); 6 Feb 2014 10:43:22 -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 14799 invoked by uid 89); 6 Feb 2014 10:43:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qa0-f54.google.com Received: from mail-qa0-f54.google.com (HELO mail-qa0-f54.google.com) (209.85.216.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 06 Feb 2014 10:43:20 +0000 Received: by mail-qa0-f54.google.com with SMTP id i13so2415054qae.41 for ; Thu, 06 Feb 2014 02:43:18 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.229.98.129 with SMTP id q1mr11147872qcn.3.1391683398066; Thu, 06 Feb 2014 02:43:18 -0800 (PST) Received: by 10.96.156.38 with HTTP; Thu, 6 Feb 2014 02:43:17 -0800 (PST) Date: Thu, 6 Feb 2014 11:43:17 +0100 Message-ID: Subject: [Patch, Fortran] PR 58470: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension From: Janus Weil To: gfortran , gcc-patches Hi all, attached is a small patch which fixes an ICE-on-invalid regression with finalization. In the PR, Dominique objected to the patch, but I think it's the correct thing to do after all. The line that I'm removing was added in a patch authored by Tobias and myself. I suspect it was added to work around some other problem in the finalization implementation, and there is no evidence it's actually needed. The patch regtests cleanly on x86_64-unknown-linux-gnu. Ok for trunk? Cheers, Janus 2014-02-06 Janus Weil PR fortran/58470 * resolve.c (resolve_fl_derived0): Remove unnecessary call to gfc_is_finalizable. 2014-02-06 Janus Weil PR fortran/58470 * gfortran.dg/finalize_22.f90: New. Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 207485) +++ gcc/fortran/resolve.c (working copy) @@ -12455,10 +12455,6 @@ resolve_fl_derived0 (gfc_symbol *sym) /* Add derived type to the derived type list. */ add_dt_to_dt_list (sym); - /* Check if the type is finalizable. This is done in order to ensure that the - finalization wrapper is generated early enough. */ - gfc_is_finalizable (sym, NULL); - return true; }