This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32140] [4.3 Regression] Miscompilation with -O1
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2007 14:03:48 -0000
- Subject: [Bug fortran/32140] [4.3 Regression] Miscompilation with -O1
- References: <bug-32140-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #25 from pinskia at gcc dot gnu dot org 2007-06-20 14:03 -------
Here is a testcase which also checks the resulting array is correct:
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")
if (b(1) .eq. "Distribution by marix blocks") call abort();
if (b(2) .eq. "Distribution by matrix rows") call abort();
if (b(3) .eq. "Distribution by matrix columns") call abort();
END
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32140