gcc/libgfortran/intrinsics
Francois-Xavier Coudert 1529b8d9be re PR fortran/30723 (Freeing memory doesn't need to call a library function)
PR fortran/30723

	* trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
	gfor_fndecl_internal_free): Remove prototypes.
	(gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
	* trans.c (gfc_call_malloc, gfc_call_free): New functions.
	* f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
	and __builtin_malloc builtins.
	* trans-decl.c (gfor_fndecl_internal_malloc,
	gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
	(gfor_fndecl_os_error): Add.
	(gfc_build_builtin_function_decls): Don't create internal_malloc,
	internal_malloc64 and internal_free library function declaration.
	Create os_error library call function declaration.
	* trans-array.c (gfc_trans_allocate_array_storage,
	gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
	gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
	gfc_call_malloc and gfc_call_free instead of building calls to
	internal_malloc and internal_free.
	* trans-expr.c (gfc_conv_string_tmp): Likewise.
	* trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
	gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
	gfc_trans_where_2: Likewise.
	* trans-intrinsic.c (gfc_conv_intrinsic_ctime,
	gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
	gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.

	* runtime/memory.c (internal_malloc, internal_malloc64,
	internal_free): Remove.
	* runtime/error.c (os_error): Export function.
	* intrinsics/move_alloc.c: Include stdlib.h.
	(move_alloc): Call free instead of internal_free.
	(move_alloc_c): Wrap long lines.
	* libgfortran.h (os_error): Export prototype.
	(internal_free): Remove prototype.
	* gfortran.map (GFORTRAN_1.0): Remove _gfortran_internal_free,
	_gfortran_internal_malloc and _gfortran_internal_malloc64.
	Add _gfortran_os_error.

From-SVN: r124721
2007-05-14 19:33:57 +00:00
..
abort.c
access.c
args.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
associated.c
c99_functions.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
chdir.c
chmod.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
clock.c
cpu_time.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
cshift0.c re PR libfortran/31286 (cshift uses uninitialized variables) 2007-04-18 08:47:28 +00:00
ctime.c
date_and_time.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
dprod_r8.f90
env.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
eoshift0.c
eoshift2.c
etime.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
exit.c
f2c_specifics.F90
fnum.c
gerror.c
getcwd.c
getlog.c re PR libfortran/31299 (Use getpwuid(geteuid()) instead of getlogin() for GETLOG()) 2007-04-25 07:36:20 +00:00
getXid.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
hostnm.c
ierrno.c
ishftc.c
kill.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
link.c
malloc.c
move_alloc.c re PR fortran/30723 (Freeing memory doesn't need to call a library function) 2007-05-14 19:33:57 +00:00
mvbits.c
pack_generic.c re PR libfortran/31001 ([4.1 only] PACK crashes on zero-sized arrays) 2007-03-03 16:37:54 +00:00
perror.c
rand.c
random.c
rename.c
reshape_generic.c re PR fortran/31196 ([4.1 only] wrong code generated with RESHAPE/TRANSPOSE) 2007-03-25 08:29:10 +00:00
reshape_packed.c
selected_int_kind.f90
selected_real_kind.f90
signal.c re PR fortran/30947 (intrinsic: ALARM) 2007-03-08 16:46:16 -05:00
size.c
sleep.c
spread_generic.c
stat.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
string_intrinsics.c re PR fortran/31304 (REPEAT argument NCOPIES is not converted as it should) 2007-04-03 21:05:14 +00:00
symlnk.c
system_clock.c cpu_time.c: Don't include headers already included by libgfortran.h. 2007-04-06 16:47:23 +00:00
system.c re PR libfortran/31607 (CALL SYSTEM produces garbled output when writing to a buffered file) 2007-05-07 19:48:40 +00:00
time.c
transpose_generic.c
umask.c
unlink.c
unpack_generic.c re PR libfortran/31286 (cshift uses uninitialized variables) 2007-04-18 08:47:28 +00:00