[Bug fortran/29396] segfault with character pointer association
fxcoudert at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 16 15:16:00 GMT 2007
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2007-03-16 15:15 -------
Joost filed PR31220, which is a duplicate of this one, but contains an
interesting testcase (compile & run) to check and add to the testsuite when
we're done with this bug:
CHARACTER(LEN=4), POINTER :: b
CHARACTER(LEN=10) :: r
b=>F1(1,r)
b="1111"
b=>F1(2,r)
b="2222"
b=>F1(3,r)
b="3333"
IF (r.NE."12222-----") CALL ABORT()
CONTAINS
FUNCTION F1(I,r) result(b)
INTEGER :: I
CHARACTER(LEN=10), TARGET, SAVE :: a="----------"
CHARACTER(LEN=10) :: r
CHARACTER(LEN=4), POINTER :: b
r=a
b=>a(I:I+3)
END FUNCTION
END
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.2.0 4.3.0
Last reconfirmed|2007-01-28 22:15:31 |2007-03-16 15:15:54
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29396
More information about the Gcc-bugs
mailing list