From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27599 invoked by alias); 5 Feb 2013 22:27:33 -0000 Received: (qmail 27347 invoked by uid 48); 5 Feb 2013 22:26:56 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails Date: Tue, 05 Feb 2013 22:27: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-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: 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 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: 2013-02/txt/msg00433.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #13 from janus at gcc dot gnu.org 2013-02-05 22:26:55 UTC --- (In reply to comment #12) > program main > implicit none > > integer, pointer :: y(:) > > y => null() > call a4t2(y) > > contains > > subroutine a4t2(x) > integer, intent(in) :: x(4) > end subroutine > > end Ok, sorry. This one is actually invalid, which is correctly caught by -fcheck=all: Fortran runtime error: Pointer actual argument 'y' is not associated However, it becomes valid when making 'x' optional (but still gives the valgrind error).