From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C58ED384C005; Thu, 6 Aug 2020 13:17:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C58ED384C005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596719824; bh=FJivtdnAdtG0dlnmeUana1ePTLbczOnFfPwA/OZkQt4=; h=From:To:Subject:Date:From; b=qahBvTKKml3BClWlSSzc59mz40NI6N850vKpaI3oCvZsz8aUOb5De1SsEeCAqmX33 DdbCTuPLzASM6dG9bUnekVgVAi4BEwo6dF5nRdBW+oQ77sb3WVNpGZX8CNHcc1/ANe tfrHJRs6wItNStlaYfTEazFZtBZefkSmUPpYwBL4= From: "paul.luckner@rwth-aachen.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/96495] New: [gfortran] MERGE does not copy ALLOCATABLE property of derived type Date: Thu, 06 Aug 2020 13:17:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paul.luckner@rwth-aachen.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2020 13:17:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96495 Bug ID: 96495 Summary: [gfortran] MERGE does not copy ALLOCATABLE property of derived type Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: paul.luckner@rwth-aachen.de Target Milestone: --- Created attachment 49011 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D49011&action=3Dedit proof of concept code There is a bug in gfortran and I singled out the problem this far: - a derived type with ALLOCATABLE data=20 - a MERGE call - an operator overloading used as argument to the MERGE call - ELEMENTAL procedure it is best to look at the proof of concept codes attached. There are 4 highlighted code sections which should all yield similar results but only one works whereas the others are broken. The bug arises when called using a vector (using the ELEMENTAL feature). =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Supplementary information $ gfortran --version GNU Fortran (GCC) 10.1.0 $ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/opt/exports/gcc-10.1.0/bin/../libexec/gcc/x86_64-pc-= linux-gnu/10.1.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-10.1.0-source/gcc-10.1.0/configure --enable-languages=3Dc,c++,fortran --enable-checking=3Drelease --disable-libstdcxx-pch --enable-libgomp --enable-lto --enable-gold --with-plugin-ld=3Dgold --prefix=3D/usr/local/gcc-10.1.0 Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.1.0 (GCC)=20 $ cat /etc/os-release=20 NAME=3D"openSUSE Leap" VERSION=3D"15.1"=