From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49230 invoked by alias); 3 May 2015 21:35:52 -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 49163 invoked by uid 48); 3 May 2015 21:35:49 -0000 From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48890] [F95] Wrong length of a character component of named constant derived-type Date: Sun, 03 May 2015 21:35: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: 6.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: NEW 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: version blocked short_desc 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-05/txt/msg00152.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48890 Francois-Xavier Coudert changed: What |Removed |Added ---------------------------------------------------------------------------- Version|4.6.1 |6.0 Blocks| |32834 Summary|length of a character |[F95] Wrong length of a |derived-type component with |character component of |PARAMETER |named constant derived-type --- Comment #3 from Francois-Xavier Coudert --- It's a "Fortran 95"-only issue! See the variant below: implicit none type :: a_t character(len=10) :: s = "x" end type a_t type(a_t), parameter :: foo = a_t("") print *, len(foo%s), len_trim(foo%s) end Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32834 [Bug 32834] [Meta-bug] 'Fortran 95'-only failures