From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19444 invoked by alias); 23 Dec 2014 21:52:40 -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 19408 invoked by uid 48); 23 Dec 2014 21:52:35 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/64397] [OOP] Runtime segfault with type-bound assignment and parenthesis Date: Tue, 23 Dec 2014 21:52: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: 4.9.2 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: NEW 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: keywords bug_status cf_reconfirmed_on cc short_desc everconfirmed 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: 2014-12/txt/msg02680.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64397 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Status|UNCONFIRMED |NEW Last reconfirmed| |2014-12-23 CC| |janus at gcc dot gnu.org Summary|memory allocation failed |[OOP] Runtime segfault with |with parenthesis |type-bound assignment and | |parenthesis Ever confirmed|0 |1 --- Comment #1 from janus at gcc dot gnu.org --- I'm not actually sure that the segfault is related to memory allocation. In any case, the output of the test case in comment 0 is: $ ./a.out called ass C: called ass C: 1.00000000 called ass Program received signal SIGSEGV: Segmentation fault - invalid memory reference. Backtrace for this error: #0 0x7F73005265F7 #1 0x7F7300526C3E #2 0x7F72FFA23D9F #3 0x7F72FFA85B5E #4 0x401926 in MAIN__ at c0.f90:32 (discriminator 1) Speicherzugriffsfehler (Speicherabzug geschrieben) This means that the call to 'ass' generated from 'c = (a)' is performed alright, but something goes wrong after that. Possibly related to cleaning up a temporary which is generated for '(a)'?