This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29396] segfault with character pointer association
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2007 15:15:54 -0000
- Subject: [Bug fortran/29396] segfault with character pointer association
- References: <bug-29396-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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