This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: min/max and string arguments


What should be the proper output of this code fragment?

	print *, MIN ("foo", "", "bar")
	end

gfortran answers "bar"


If so, it's a recent change, since the version on my laptop gives the right answer (it's dated 20081211):

lumo /tmp $ cat a.f90
write (*,"('#',A,'#')") MIN ("foo", "", "bar")
end
lumo /tmp $ gfortran -v
Using built-in specs.
Target: i386-apple-darwin8.10.1
Configured with: /tmp/gfortran-20081211/ibin/../gcc/configure -- prefix=/usr/local/gfortran --enable-languages=c,fortran --with-gmp=/ tmp/gfortran-20081211/gfortran_libs --enable-bootstrap
Thread model: posix
gcc version 4.4.0 20081211 (experimental) [trunk revision 142675] (GCC)
lumo /tmp $ gfortran a.f90 && ./a.out
# #



(I remember having thought about it quite a bit when working on widechar strings SELECT)


--
FX


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