public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67988] New: ICE on accessing substring with negative range in array constructor
@ 2015-10-16 14:18 gerhard.steinmetz.fortran@t-online.de
2015-10-16 19:16 ` [Bug fortran/67988] " kargl at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-16 14:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67988
Bug ID: 67988
Summary: ICE on accessing substring with negative range in
array constructor
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: ---
Accessing a correctly declared character with negative substring-
range (len < -1) e.g. inside of an array constructor (temp array)
requests memory of about 2^64 (= 18446744073709551616) :
$ cat z1.f90
program p
character(3), parameter :: c = 'abc'
character(3) :: x(1)
x = c(:-2)
x = [ c(:-2) ]
end
$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z1.f90
f951: out of memory allocating 18446744073709551612 bytes after a total of
434176 bytes
---
With len = -1 :
$ cat z3.f90
program p
character(3), parameter :: c = 'abc'
character(3) :: x(1)
x = c(:-1)
x = [ c(:-1) ]
print *, x
end
$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z3.f90
$ a.out
$ gfortran z3.f90
$ a.out
?
---
Maybe related to pr67987.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/67988] ICE on accessing substring with negative range in array constructor
2015-10-16 14:18 [Bug fortran/67988] New: ICE on accessing substring with negative range in array constructor gerhard.steinmetz.fortran@t-online.de
@ 2015-10-16 19:16 ` kargl at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-16 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67988
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |kargl at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #1 from kargl at gcc dot gnu.org ---
The fix for 67987 fixes this problem.
*** This bug has been marked as a duplicate of bug 67987 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-16 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-16 14:18 [Bug fortran/67988] New: ICE on accessing substring with negative range in array constructor gerhard.steinmetz.fortran@t-online.de
2015-10-16 19:16 ` [Bug fortran/67988] " kargl at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).