[Bug fortran/32140] [4.3 Regression] Miscompilation with -O1
jv244 at cam dot ac dot uk
gcc-bugzilla@gcc.gnu.org
Tue May 29 15:41:00 GMT 2007
------- Comment #2 from jv244 at cam dot ac dot uk 2007-05-29 15:41 -------
I assume this is another incarnation of this bugs but leads to a segfault and a
slightly different valgrind output:
MODULE TEST
CONTAINS
PURE FUNCTION s2a_3(s1,s2,s3) RESULT(a)
CHARACTER(LEN=*), INTENT(IN) :: s1, s2, s3
CHARACTER(LEN=1000), DIMENSION(3) :: a
a(1)=s1; a(2)=s2; a(3)=s3
END FUNCTION
END MODULE
USE TEST
character(LEN=80) :: b(3)
b=s2a_3("Distribution by marix blocks", "Distribution by matrix rows",&
"Distribution by matrix columns")
write(6,*) b(3)
END
==21561== at 0x4A21AF0: memset (mc_replace_strmem.c:490)
==21561== by 0x400A8B: __test_MOD_s2a_3 (in /users/vondele/g95/a.out)
==21561== by 0x40089D: MAIN__ (in /users/vondele/g95/a.out)
==21561== by 0x400B4B: main (fmain.c:22)
==21561== Address 0x7FF005B80 is not stack'd, malloc'd or (recently) free'd
==21561==
==21561== Process terminating with default action of signal 11 (SIGSEGV)
==21561== Access not within mapped region at address 0x7FF005B80
==21561== at 0x4A21AF0: memset (mc_replace_strmem.c:490)
==21561== by 0x400A8B: __test_MOD_s2a_3 (in /users/vondele/g95/a.out)
==21561== by 0x40089D: MAIN__ (in /users/vondele/g95/a.out)
==21561== by 0x400B4B: main (fmain.c:22)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32140
More information about the Gcc-bugs
mailing list