gcc/libgfortran/intrinsics
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
..
abort.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
args.c re PR libfortran/20085 (iargc returns wrong count for number of program arguments) 2005-02-20 15:24:02 +00:00
associated.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
bessel.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
c99_functions.c re PR libfortran/19302 (intrinsic_nearest.f90 fails) 2005-02-21 21:39:33 +00:00
chdir.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
cpu_time.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
cshift0.c re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 21:38:23 +00:00
date_and_time.c * intrinsic/date_and_time.c: Fix conformance problems. 2005-02-19 18:06:00 +00:00
dprod_r8.f90 Merge tree-ssa-20020619-branch into mainline. 2004-05-13 02:41:07 -04:00
env.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
eoshift0.c re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 21:38:23 +00:00
eoshift2.c re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 21:38:23 +00:00
erf.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
etime.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
exit.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
f2c_specifics.F90 re PR fortran/20178 (COMPLEX function returns incompatible with g77) 2005-05-11 00:06:55 +02:00
flush.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
fnum.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
gerror.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
getXid.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
getcwd.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
getlog.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
hostnm.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
ierrno.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
ishftc.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
kill.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
link.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
mvbits.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
pack_generic.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
perror.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
rand.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
random.c re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 21:38:23 +00:00
rename.c * intrinsics/rename.c: Add missing #includes. 2005-04-29 02:46:36 +02:00
reshape_generic.c 05-04-22 Thomas Koenig <Thomas.Koenig@online.de> 2005-04-22 20:02:44 +00:00
reshape_packed.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
selected_int_kind.f90 Makefile.am (gfor_helper_src): Split selected_kind.f90. 2004-08-30 14:34:37 -07:00
selected_real_kind.f90 Makefile.am (gfor_helper_src): Split selected_kind.f90. 2004-08-30 14:34:37 -07:00
size.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
sleep.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
spread_generic.c re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 21:38:23 +00:00
stat.c re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly) 2005-05-04 21:38:23 +00:00
string_intrinsics.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
symlnk.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
system.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
system_clock.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
time.c Makefile.am: Added new files. 2005-03-22 22:08:22 +00:00
transpose_generic.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
umask.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
unlink.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00
unpack_generic.c re PR libfortran/19280 (Inconsistent licensing of libgfortran) 2005-01-12 21:27:33 +00:00