From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16851 invoked by alias); 4 Sep 2015 09:39:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16812 invoked by uid 48); 4 Sep 2015 09:39:22 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/67430] reallocate lhs with overloaded assignment operators causes memory error and wrong size Date: Fri, 04 Sep 2015 09:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg00330.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67430 --- Comment #4 from Dominique d'Humieres --- Am I correct to summarize (simplify?) your expectation (interpretation as: use the overloaded assignment if the lhs and rhs are conforming, otherwise use the intrinsic assignment? If yes, what the compiler should do if some bounds are only known at run time? I agree with the first comment of Ian Harvey at https://groups.google.com/forum/#!topic/comp.lang.fortran/Vk4D8iDZOdc. I have no opinion for the second test in the above thread, beside a "don't do that!". If you think it is a gfortran bug, please file a new PR and, if possible, outputs from other compilers you have access to.