gcc/libgfortran
Tobias Schlüter 973ff4c052 re PR fortran/20178 (COMPLEX function returns incompatible with g77)
gcc/fortran/
	PR fortran/20178
	* gfortran.h (gfc_option): Add flag_f2c.
	* invoke.texi: Document '-ff2c' command line option.  Adapt
	documentation for '-fno-second-underscore' and '-fno-underscoring'.
	* lang.opt (ff2c): New entry.
	* options.c (gfc-init_options): Set default calling convention
	to -fno-f2c.  Mark -fsecond-underscore unset.
	(gfc_post_options): Set -fsecond-underscore if not explicitly set
	by user.
	(handle_options): Set gfc_option.flag_f2c according to requested
	calling	convention.
	* trans-decl.c (gfc_get_extern_function_decl): Use special f2c
	intrinsics where necessary.
	(gfc_trans_deferred_vars): Change todo error to	assertion.
	* trans-expr.c (gfc_conv_variable): Dereference access
	to hidden result argument.
	(gfc_conv_function_call): Add hidden result argument to argument
	list if f2c calling conventions requested.  Slightly restructure
	tests.  Convert result of default REAL function to requested type
	if f2c calling conventions are used.  Dereference COMPLEX result
	if f2c cc are used.
	* trans-types.c (gfc_sym_type):  Return double for default REAL
	function if f2c cc are used.
	(gfc_return_by_reference): Slightly restructure logic.  Return
	COMPLEX by reference depending on calling conventions.
	(gfc_get_function_type): Correctly make hidden result argument a
	pass-by-reference argument for COMPLEX.  Remove old code which does
	this for derived types.
libgfortran/
	PR fortran/20178
	* Makefile.am (gfor_specific_src): Add 'intrinsics/f2c_intrinsics.F90'
	to dependencies.
	* Makefile.in: Regenerate.
	* intrinsics/f2c_specific.F90: New file.
gcc/testsuite/
	PR fortran/20178
	* gfortran.dg/f2c_1.f90, gfortran.dg/f2c_2.f90,
	gfortran.dg/f2c_3.f90: New tests.

From-SVN: r99544
2005-05-11 00:06:55 +02:00
..
generated re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 21:38:23 +00:00
intrinsics re PR fortran/20178 (COMPLEX function returns incompatible with g77) 2005-05-11 00:06:55 +02:00
io re PR libfortran/20788 (Loading libgfortran.so clobbers C redirection of stdin/stdout/stderr) 2005-05-10 08:34:58 +00:00
m4 re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 21:38:23 +00:00
runtime * runtime/environ.c: Correct previous commit for obvious typo. 2005-04-10 13:08:12 +00:00
.cvsignore
acinclude.m4 acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New. 2004-12-12 00:59:05 -08:00
aclocal.m4 re PR fortran/20178 (COMPLEX function returns incompatible with g77) 2005-05-11 00:06:55 +02:00
c99_protos.h re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
ChangeLog re PR fortran/20178 (COMPLEX function returns incompatible with g77) 2005-05-11 00:06:55 +02:00
config.h.in configure.ac: Check for ftruncate and chsize. 2005-04-29 14:24:04 +00:00
configure * configure: Regenerate. 2005-05-10 01:43:00 +00:00
configure.ac configure.ac: Check for ftruncate and chsize. 2005-04-29 14:24:04 +00:00
fmain.c
libgfortran.h re PR libfortran/18958 ([4.0 only] eoshift segfaults when shifting off the end of an array) 2005-04-30 20:51:39 +00:00
libtool-version
Makefile.am re PR fortran/20178 (COMPLEX function returns incompatible with g77) 2005-05-11 00:06:55 +02:00
Makefile.in re PR fortran/20178 (COMPLEX function returns incompatible with g77) 2005-05-11 00:06:55 +02:00
mk-sik-inc.sh mk-sik-inc.sh: Use a temporary string instead of 'echo -n'. 2004-09-01 17:51:42 +00:00
mk-srk-inc.sh mk-sik-inc.sh: Use a temporary string instead of 'echo -n'. 2004-09-01 17:51:42 +00:00