From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16955 invoked by alias); 5 Feb 2013 21:26:04 -0000 Received: (qmail 16658 invoked by uid 48); 5 Feb 2013 21:25:16 -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 21:26: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/msg00428.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978 --- Comment #12 from janus at gcc dot gnu.org 2013-02-05 21:25:09 UTC --- Here is a further reduced test case, based on comment 1 and 3 (which are basically identical): program main implicit none integer, pointer :: y(:) y => null() call a4t2(y) contains subroutine a4t2(x) integer, intent(in) :: x(4) end subroutine end It yields valgrind errors with all gfortran versions I tried (trunk, 4.7, 4.6 and 4.3): ==5664== Conditional jump or move depends on uninitialised value(s) ==5664== at 0x4F25F05: _gfortran_internal_pack (in_pack_generic.c:53) ==5664== by 0x40076E: MAIN__ (in /home/jweil/GSoC/PRs/55978/a.out) ==5664== by 0x4007CA: main (in /home/jweil/GSoC/PRs/55978/a.out) So it seems this is not an actual regression?!? class_optional_2.f90 was introduced only in 4.8, and possibly r195125 only uncovered an existing bug (e.g. by adding a call to _gfortran_internal_pack).