From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108924 invoked by alias); 7 Oct 2015 18:59:56 -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 108867 invoked by uid 48); 7 Oct 2015 18:59:53 -0000 From: "gerhard.steinmetz.fortran@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/67884] New: Missing error message on required allocatable attribute Date: Wed, 07 Oct 2015 18:59: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: 5.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gerhard.steinmetz.fortran@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 target_milestone 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: 2015-10/txt/msg00532.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67884 Bug ID: 67884 Summary: Missing error message on required allocatable attribute Product: gcc Version: 5.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fortran@t-online.de Target Milestone: --- This definition of f is incomplete : $ cat z2a.f90 program p integer i print *, [(f(i), i=1,3)] contains function f(n) integer :: n character(:) :: f character(3) :: c = 'abc' f = c(n:n) end end $ gfortran -g -O0 -Wall -fcheck=all z2a.f90 $ a.out With additional/different options other effects may occur. Only sometimes. Needs running a.out many times. For example : $ gfortran -g -O0 -fcheck=all -fstack-protector z2a.f90 $ a.out Operating system error: Cannot allocate memory Memory allocation failed