From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101788 invoked by alias); 20 Mar 2015 13:53:54 -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 101716 invoked by uid 48); 20 Mar 2015 13:53:49 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/61275] Invalid initialization expression for ALLOCATABLE component in structure constructor at (1) Date: Fri, 20 Mar 2015 14:57: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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: vehre at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: 2015-03/txt/msg02117.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61275 --- Comment #8 from Dominique d'Humieres --- module A Type T character(LEN=:), allocatable :: S end type character(len=6), parameter :: str = 'string' Type(T) :: TestObj = T(str) end module is rejected with Type(T) :: TestObj = T(str) 1 Error: Invalid initialization expression for ALLOCATABLE component 's' in structure constructor at (1) So it seems that > (a) an allocatable component is a reference to the intrinsic function NULL, has to be taken in the most restrictive way. If nobody objects, I'll close the PR as FIXED again.