This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32140] [4.3 Regression] Miscompilation with -O1



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]