From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7010 invoked by alias); 6 Jan 2014 06:45:48 -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 6937 invoked by uid 55); 6 Jan 2014 06:45:44 -0000 From: "jochen.kuepper at cfel dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/15966] [4.0 Only] ICE and segmentation fault on internal write Date: Mon, 06 Jan 2014 06:45: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.0.0 X-Bugzilla-Keywords: ice-on-valid-code, monitored X-Bugzilla-Severity: normal X-Bugzilla-Who: jochen.kuepper at cfel dot de X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: fengwang at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.0.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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-SW-Source: 2014-01/txt/msg00365.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D15966 --- Comment #110 from jochen.kuepper at cfel dot de --- You have contacted me on an old email address at the FHI Berlin. This accou= nt will soon not be available anymore. Please change your address book to use jochen.kuepper@cfel.de. On 06.01.2014, at 07:44, dominiq at lps dot ens.fr wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D15966 >=20 > Dominique d'Humieres changed: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0What =C2=A0= =C2=A0=C2=A0|Removed =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|Added > -------------------------------------------------------------------------= --- > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0CC|jochen@fhi-berlin.mpg.de =C2=A0=C2=A0=C2=A0| >=20 > --=20 > You are receiving this mail because: > You are on the CC list for the bug. >>From gcc-bugs-return-439224-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 06 06:51:25 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 15281 invoked by alias); 6 Jan 2014 06:51:25 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 15257 invoked by uid 48); 6 Jan 2014 06:51:21 -0000 From: "rouson at stanford dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59694] New: no finalization of an unused variable Date: Mon, 06 Jan 2014 06:51:00 -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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rouson at stanford dot edu X-Bugzilla-Status: UNCONFIRMED 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 Message-ID: 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-01/txt/msg00366.txt.bz2 Content-length: 1314 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59694 Bug ID: 59694 Summary: no finalization of an unused variable Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: rouson at stanford dot edu With the current trunk, the final subroutine is not invoked when the variable "bar" goes out of scope in the following code: localhost:~ rouson$ cat final.f90 module foo_module implicit none type foo contains final :: hello end type contains subroutine hello(this) type(foo) :: this print *,"Hello from finalizer." end subroutine end module program main use foo_module implicit none block type(foo) :: bar end block end program localhost:~ rouson$ /usr/local/bin/gfortran final.f90 localhost:~ rouson$ ./a.out localhost:~ rouson$ /usr/local/bin/gfortran --version GNU Fortran (GCC) 4.9.0 20140104 (experimental) Copyright (C) 2014 Free Software Foundation, Inc. While this behavior seems reasonable at high optimization levels, I believe the final subroutine should at least be invoked for the default optimization level. The NAG compiler invokes the final subroutine. Damian