From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32344 invoked by alias); 6 Oct 2014 22:19:05 -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 32280 invoked by uid 55); 6 Oct 2014 22:19:01 -0000 From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/61886] [4.8/4.9/5 Regression] LTO breaks fread with _FORTIFY_SOURCE=2 Date: Mon, 06 Oct 2014 22:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: diagnostic, lto, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at ucw dot cz X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg00430.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61886 --- Comment #15 from Jan Hubicka --- > On Mon, Oct 06, 2014 at 11:55:23PM +0200, Jan Hubicka wrote: > > Hi, > > I am testing this variant of the patch. > > For gcc-4.9 branch it may make sense to enable the new patch for LTO on= ly. >=20 > Not printing the inlining backtrace would be IMHO a significant regressio= n. OK, how do I print it? I keep the BLOCK of the original expresison, so it = is there. Honza >=20 > Jakub >>From gcc-bugs-return-463410-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 06 22:27:38 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 5182 invoked by alias); 6 Oct 2014 22:27:38 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 5157 invoked by uid 48); 6 Oct 2014 22:27:34 -0000 From: "davidgkinniburgh at yahoo dot co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/63469] New: Automatic reallocation of allocatable scalar length even when substring implicitly specified Date: Mon, 06 Oct 2014 22:27: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: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: davidgkinniburgh at yahoo dot co.uk X-Bugzilla-Status: UNCONFIRMED 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 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: 2014-10/txt/msg00431.txt.bz2 Content-length: 1323 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63469 Bug ID: 63469 Summary: Automatic reallocation of allocatable scalar length even when substring implicitly specified Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: davidgkinniburgh at yahoo dot co.uk CHARACTER(:), ALLOCATABLE :: s ALLOCATE (character(32) :: s) s(1:32) = 'string' print *, 'Length of ', s, ' with substring = ', LEN(s) s(:) = 'string' print *, 'Length of ', s, ' with substring = ', LEN(s) s = 'string' print *, 'Length of ', s, ' without substring = ', LEN(s) gfortran (4.9.1 and earlier) gives: Length of string with substring = 32 Length of string with substring = 6 Length of string without substring = 6 IVF (15.0) gives: Length of string with substring = 32 Length of string with substring = 32 Length of string without substring = 6 which I think is correct. It is the implicit definition of both the beginning and the ending of 's' that seems to do the damage.