From patchwork Mon Mar 15 14:33:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Richard Thomas X-Patchwork-Id: 1453307 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=y2QGA66w; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dzf7Y2bMhz9vJx for ; Tue, 16 Mar 2021 01:34:15 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EFB81386100A; Mon, 15 Mar 2021 14:34:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFB81386100A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1615818851; bh=wW0xtxhrMw3LH9mAryHgepEVe5/RP7U+Q/QKA217pck=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=y2QGA66wLyzBRvc0Wnc6TLFfwWQ34t1Nb/DEM138h/YMX91AXGkoQQfiKzQYyUa+o j/AgzVB2VwfU6Sh4rNBK86s3tSMD+iD4P6UZTjAqD5vyEWr95qRfsOGQCGkAIGamEg Bcl8qOhNiQwdsuNizrtapUk7GXl+H+UQ0q7VvxOc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 923EE3858018; Mon, 15 Mar 2021 14:34:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 923EE3858018 Received: by mail-lj1-x236.google.com with SMTP id 16so16508678ljc.11; Mon, 15 Mar 2021 07:34:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=otYY9mF8w5u6l/lokC6xehV+YRrrqhx5dqv8pHeeE4M=; b=EyXBnMzvqV8PiRz90ebVZlWfmy4cugX4Zy0SAnwb52AuuppbXYXgtzi2hI+jiKGskO hsW9foWFFmq5evSrkj/g8SgKC5+A3J5CdITo1126CvzpxfbiZ5Wd74jbzAyP+PexH/+K m1gH25O3lCeyNOSE7tyaooa008Qzru4mlMdQVyJEIBnkHv/oCubwpJc1kqIyRb6Jmk6n oyijBrAJIx+nCxFj6+CI6m1I22+TPjTDqIcw0WlgE20fQhDFGVGi7pfGGHEzV5wfCKU8 ky9VKueks6RH+bcOPpjyrXFGNxgr2t5GUhPFrLvvp4obyLgNyP8VR59KXpKGGZVBCvJC g9wg== X-Gm-Message-State: AOAM5305SihlK0kE/MaXETvw5EreqPr5f8MjV2TRZwHind7tAjE0vuOe 3ipSxSIy4jLo2pgORrESq0wRWHRW/Y03KhxQXwMRca/jMdU= X-Google-Smtp-Source: ABdhPJyVGMi6uGcQ2rF06KASUkW9Gl2KhE5R0ZxAZmwjGsxbsV3kho+kjOp+GIhErJOc4xhD8mzcg3U2ztseegkodss= X-Received: by 2002:a05:651c:39d:: with SMTP id e29mr11061812ljp.259.1615818845113; Mon, 15 Mar 2021 07:34:05 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 15 Mar 2021 14:33:53 +0000 Message-ID: Subject: [Patch, fortran] PR99545 [11 Regression] ICE in gfc_trans_assignment since r11-6253-gce8dcc9105cbd404 To: "fortran@gcc.gnu.org" , gcc-patches X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, HTML_MESSAGE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Paul Richard Thomas via Gcc-patches From: Paul Richard Thomas Reply-To: Paul Richard Thomas Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Applied to all three branches, after regtesting on each, as blindingly obvious. The testcase is the reduced version in comment #6 of the PR. Paul Fortran: Fix problem with allocate initialization [PR99545]. 2021-03-15 Paul Thomas gcc/fortran/ChangeLog PR fortran/99545 * trans-stmt.c (gfc_trans_allocate): Mark the initialization assignment by setting init_flag. gcc/testsuite/ChangeLog PR fortran/99545 * gfortran.dg/pr99545.f90: New test. diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 547468f7648..7cbdef7a304 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -7001,7 +7001,7 @@ gfc_trans_allocate (gfc_code * code) gfc_expr *init_expr = gfc_expr_to_initialize (expr); gfc_expr *rhs = e3rhs ? e3rhs : gfc_copy_expr (code->expr3); flag_realloc_lhs = 0; - tmp = gfc_trans_assignment (init_expr, rhs, false, false, true, + tmp = gfc_trans_assignment (init_expr, rhs, true, false, true, false); flag_realloc_lhs = realloc_lhs; /* Free the expression allocated for init_expr. */