gcc/libgfortran/intrinsics
Janne Blomqvist 92e6f3a43e Introduce xmallocarray, an overflow checking variant of xmalloc.
2014-06-17  Janne Blomqvist  <jb@gcc.gnu.org>

	* libgfortran.h (xmallocarray): New prototype.
	* runtime/memory.c (xmallocarray): New function.
	(xcalloc): Check for nonzero separately instead of multiplying.
	* generated/*.c: Regenerated.
	* intrinsics/cshift0.c (cshift0): Call xmallocarray instead of
	xmalloc.
	* intrinsics/eoshift0.c (eoshift0): Likewise.
	* intrinsics/eoshift2.c (eoshift2): Likewise.
	* intrinsics/pack_generic.c (pack_internal): Likewise.
	(pack_s_internal): Likewise.
	* intrinsics/reshape_generic.c (reshape_internal): Likewise.
	* intrinsics/spread_generic.c (spread_internal): Likewise.
	(spread_internal_scalar): Likewise.
	* intrinsics/string_intrinsics_inc.c (string_trim): Likewise.
	(string_minmax): Likewise.
	* intrinsics/transpose_generic.c (transpose_internal): Likewise.
	* intrinsics/unpack_generic.c (unpack_internal): Likewise.
	* io/list_read.c (nml_touch_nodes): Don't cast xmalloc return value.
	* io/transfer.c (st_set_nml_var): Call xmallocarray instead of
	xmalloc.
	* io/unit.c (get_internal_unit): Likewise.
	(filename_from_unit): Don't cast xmalloc return value.
	* io/write.c (nml_write_obj): Likewise, formatting.
	* m4/bessel.m4 (bessel_jn_r'rtype_kind`): Call xmallocarray
	instead of xmalloc.
	(besse_yn_r'rtype_kind`): Likewise.
	* m4/cshift1.m4 (cshift1): Likewise.
	* m4/eoshift1.m4 (eoshift1): Likewise.
	* m4/eoshift3.m4 (eoshift3): Likewise.
	* m4/iforeach.m4: Likewise.
	* m4/ifunction.m4: Likewise.
	* m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
	Likewise.
	* m4/in_pack.m4 (internal_pack_'rtype_ccode`): Likewise.
	* m4/matmul.m4 (matmul_'rtype_code`): Likewise.
	* m4/matmull.m4 (matmul_'rtype_code`): Likewise.
	* m4/pack.m4 (pack_'rtype_code`): Likewise.
	* m4/reshape.m4 (reshape_'rtype_ccode`): Likewise.
	* m4/shape.m4 (shape_'rtype_kind`): Likewise.
	* m4/spread.m4 (spread_'rtype_code`): Likewise.
	(spread_scalar_'rtype_code`): Likewise.
	* m4/transpose.m4 (transpose_'rtype_code`): Likewise.
	* m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
	(unpack1_'rtype_code`): Likewise.
	* runtime/convert_char.c (convert_char1_to_char4): Likewise.
	(convert_char4_to_char1): Simplify.
	* runtime/environ.c (init_unformatted): Call xmallocarray instead
	of xmalloc.
	* runtime/in_pack_generic.c (internal_pack): Likewise.

From-SVN: r211721
2014-06-17 06:50:34 +03:00
..
abort.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
access.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
args.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
associated.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
bit_intrinsics.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
c99_functions.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
chdir.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
chmod.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
clock.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
cpu_time.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
cshift0.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00
ctime.c PR 61310 Rewrite implementation of CTIME and FDATE intrinsics. 2014-05-26 21:17:13 +03:00
date_and_time.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
dprod_r8.f90 Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
dtime.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
env.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
eoshift0.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00
eoshift2.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00
erfc_scaled_inc.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
erfc_scaled.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
etime.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
execute_command_line.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
exit.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
extends_type_of.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
f2c_specifics.F90 Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
fnum.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
gerror.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
getcwd.c getcwd.c: Include stdlib.h. 2014-05-27 11:15:52 +02:00
getlog.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
getXid.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
hostnm.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
ierrno.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
ishftc.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
iso_c_binding.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
iso_c_binding.h Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
iso_c_generated_procs.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
kill.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
link.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
malloc.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
move_alloc.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
mvbits.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
pack_generic.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00
perror.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
rand.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
random.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
rename.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
reshape_generic.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00
reshape_packed.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
selected_char_kind.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
selected_int_kind.f90 Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
selected_real_kind.f90 Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
signal.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
size.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
sleep.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
spread_generic.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00
stat.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
string_intrinsics_inc.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00
string_intrinsics.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
symlnk.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
system_clock.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
system.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
time_1.h Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
time.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
transpose_generic.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00
umask.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
unlink.c Update copyright years in libgfortran/ 2014-01-02 22:25:45 +00:00
unpack_generic.c Introduce xmallocarray, an overflow checking variant of xmalloc. 2014-06-17 06:50:34 +03:00