------- Comment #24 from jv244 at cam dot ac dot uk 2007-06-20 14:03 -------
(In reply to comment #22)
> It would be nice if a fortraner could make the testcase not output to
> stdout/err
> but to /dev/null instead.
>
> open(6,'/dev/null')
>
> didn't work for me ;)
>
> Just to make a testcase suitable for the testsuite.
The following testcase, for an unpatched compiler, aborts at -O1, works fine at
-O0, and doesn't write to stdout/stderr... I guess that fits the testsuite ?
MODULE TEST
CONTAINS
PURE FUNCTION s2a_3(s1,s2,s3) RESULT(a)
CHARACTER(LEN=*), INTENT(IN) :: s1, s2, s3
CHARACTER(LEN=4), DIMENSION(3) :: a
a(1)=s1; a(2)=s2; a(3)=s3
END FUNCTION
END MODULE
USE TEST
character(len=12) :: line
write(line,'(3A4)') s2a_3("a","bb","ccc")
IF (line.NE."a bb ccc") CALL ABORT()
END
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32140