From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32507 invoked by alias); 17 Feb 2011 10:23:37 -0000 Received: (qmail 32498 invoked by uid 22791); 17 Feb 2011 10:23:37 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Feb 2011 10:23:33 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47775] Wrong code with allocatable function RESULT and GENERIC interfaces X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Keywords Summary Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 17 Feb 2011 10:35:00 -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 X-SW-Source: 2011-02/txt/msg02013.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47775 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Summary|Error on allocatable array |Wrong code with allocatable |returned by function |function RESULT and GENERIC | |interfaces --- Comment #4 from Tobias Burnus 2011-02-17 10:23:21 UTC --- Reduced test case: The crucial point is the GENERIC interface. interface gen procedure foo end interface gen integer :: bar(2) bar = gen() contains function foo() integer, allocatable :: foo(:) allocate(foo(2)) end function foo end * * * (In reply to comment #3) > The problem reported on the string_to_char is correct in the sense that if > invoked with a non allocated string it would cause a segfault. Well, it did here - and the failure came before the failure you reported ...