From patchwork Fri Nov 18 13:03:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janus Weil X-Patchwork-Id: 696564 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 3tKyqS6JqZz9sxS for ; Sat, 19 Nov 2016 00:03:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="hP76b9oj"; dkim-atps=neutral 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:from:date:message-id:subject:to:content-type; q= dns; s=default; b=rstkERq6M/RPhKHHYVElxwCPzanWT99bZAaUxcmMlEeldW HB7R66Qq1kSW1NfGufPkMoZhF+SJccgY1YwNTiVFSoHp1xjwPhGPsf27IQ2t9Lqs 9bRURO8nCTek0TpGsq5hD0Ng/ejRVgt17FMe7VeQAAigDRhcta1Q4BYxXcdSI= 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:from:date:message-id:subject:to:content-type; s= default; bh=AmtPYsfPb7pdU15MAaRy2RXnNHU=; b=hP76b9ojtoWUQDp9bdm/ kLmn/SUMaK8gM+M1bCKZRjaDb9sGgyDoEvThVWrOEpHPVz4NsthH8ukxJKKnLHVE 0oThpy2OezSCU0/TOY8Xxiyfa0ima6t5HjaDy2zYGSg1lgUM8WjlyqRgqzVn0GNu VvOuT8jZheD8DwlJO2dIvjA= Received: (qmail 79566 invoked by alias); 18 Nov 2016 13:03:40 -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 79538 invoked by uid 89); 18 Nov 2016 13:03:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1349 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-yw0-f193.google.com Received: from mail-yw0-f193.google.com (HELO mail-yw0-f193.google.com) (209.85.161.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Nov 2016 13:03:29 +0000 Received: by mail-yw0-f193.google.com with SMTP id b66so19812928ywh.2; Fri, 18 Nov 2016 05:03:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=Xb8c6WD78xAA6BQibVUpS3mutqQhlySvLidMjjNJ1gQ=; b=jR2mC5TD6PqcIpDSdBxbqyASZitmso+1gjB/NAVyU56NsWJ+vxRR2LAr6n3QIrd9PL ZP9ldIeEtFujM4EBLvCWRjhB47S2YCR0reuQDV4xKz6hQNi+9n8ye/TUAFNBMrhOFlQc iHXH0TuyxQtZ02rXHVo9Opoc4HqJKFx3CaTsb133rKuBSV+FDHnJScT9/u8Upksv7rhx jI6cjhsj7Xg7swmw7WZ+po5sJsxHJH/f03eg0Pq8w5MY/eushkUH4nzHawe0ApwiAC4R DDuaMoaCTTwGq6LqDNhOeIFTk4ObF5n4LT9v75o2nMxs5GP94TJH6rtfTqKNcwD20IRZ YsoA== X-Gm-Message-State: ABUngverXoH2slf20NIcwbjzZ8EQYLAfSHeHKvQTLJXITs5mnqyKM0vgcc4DCsZs6j7LkjuRYiEWbxGSYed2KA== X-Received: by 10.13.226.85 with SMTP id l82mr7026698ywe.43.1479474207905; Fri, 18 Nov 2016 05:03:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.52.2 with HTTP; Fri, 18 Nov 2016 05:03:27 -0800 (PST) From: Janus Weil Date: Fri, 18 Nov 2016 14:03:27 +0100 Message-ID: Subject: [Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979 To: gfortran , gcc-patches Hi all, the attached patch fixes an ice-on-valid problem, simply by removing an assert. The generated code works as expected and the patch regtests cleanly on x86_64-linux-gnu. Ok for trunk? Cheers, Janus 2016-11-18 Janus Weil PR fortran/78392 * trans-array.c (gfc_trans_auto_array_allocation): Remove an assert. 2016-11-18 Janus Weil PR fortran/78392 * gfortran.dg/saved_automatic_2.f90: New test case. Index: gcc/fortran/trans-array.c =================================================================== --- gcc/fortran/trans-array.c (Revision 242586) +++ gcc/fortran/trans-array.c (Arbeitskopie) @@ -5976,7 +5976,6 @@ gfc_trans_auto_array_allocation (tree decl, gfc_sy type = TREE_TYPE (type); gcc_assert (!sym->attr.use_assoc); - gcc_assert (!TREE_STATIC (decl)); gcc_assert (!sym->module); if (sym->ts.type == BT_CHARACTER