Jakub Jelinek
818ab71a41
Update copyright years.
...
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Janne Blomqvist
71cda9cac8
PR 53379 Print backtrace on error termination.
...
2015-09-05 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/53379
* libgfortran.h (exit_error): New prototype.
* runtime/error.c (exit_error): New function.
(os_error): Call exit_error instead of exit.
(runtime_error): Likewise.
(runtime_error_at): Likewise.
(internal_error): Likewise.
(generate_error): Likewise.
(notify_std): Likewise.
* runtime/stop.c (error_stop_string): Likewise.
(error_stop_numeric): Likewise.
From-SVN: r227503
2015-09-05 01:17:11 +03:00
Janne Blomqvist
1b0b9fcb92
PR 67414 Better diagnostics on backtrace failure, gf_strerror bugfix
...
2015-09-02 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/67414
* io/write.c (gfc_itoa): Move to runtime/string.c.
* libgfortran.h (show_backtrace): Make arg bool.
(gfc_itoa): New prototype.
* runtime/backtrace.c (struct mystate): Change type of try_simple
field, add in_signal_handler field.
(error_callback): Print out error number, or if not in a signal
handler, the error message.
(show_backtrace): Change type of arg, change initialization of
struct mystate.
(backtrace): Call show_backtrace with correct arg type.
* runtime/compile_options.c (backtrace_handler): Call with correct
arg type.
* runtime/error.c (sys_abort): Likewise.
(gf_strerror): Handle newlocale() failure.
* runtime/string.c (gfc_itoa): Function moved here from
io/write.c.
From-SVN: r227404
2015-09-02 17:51:40 +03:00
Francois-Xavier Coudert
485adf79b5
libgfortran.h (show_variables): Remove prototype.
...
* libgfortran.h (show_variables): Remove prototype.
* runtime/environ.c (print_spaces, var_source, show_integer,
show_boolean, show_sep, show_string): Remove functions.
* runtime/main.c (init): Remove dead code.
From-SVN: r227208
2015-08-26 06:34:05 +00:00
Francois-Xavier Coudert
ad4f95e395
re PR libfortran/54572 (Use libbacktrace library)
...
PR libfortran/54572
* Makefile.def: Make libgfortran depend on libbacktrace.
* Makefile.in: Regenerate.
* config-lang.in: Add libbacktrace to target_libs.
* Makefile.am (libgfortran_la_LDFLAGS): Link in libbacktrace.
(AM_CPPFLAGS): Add libbacktrace directories to include paths.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac: Remove checks for strtok_r, wait, execve, pipe,
and dup2. Remove call to GCC_CHECK_UNWIND_GETIPINFO.
* libgfortran.h (full_exe_path, find_addr2line, backtrace): Remove
prototypes.
(show_backtrace): Add prototype.
* runtime/backtrace.c: Rework file entirely.
* runtime/compile_options.c (backtrace_handler): Rename backtrace
to show_backtrace.
(maybe_find_addr2line): Remove function.
(set_options): Remove call to maybe_find_addr2line.
* runtime/error.c (sys_abort): Rename backtrace to show_backtrace.
* runtime/main.c (store_exe_path): Empty function body.
(full_exe_path, gfstrtok_r, find_addr2line): Remove functions.
(cleanup): Don't free removed variables.
* runtime/minimal.c (full_exe_path): Remove function.
(set_args): Don't set exe_path.
* gfortran.dg/backtrace_1.f90: New test.
From-SVN: r227106
2015-08-23 21:50:30 +00:00
Francois-Xavier Coudert
c2cc83bc88
re PR libfortran/66458 (Loading libgfortran.so changes the FPU exception flags)
...
PR libfortran/66458
* runtime/main.c (init): Only call set_fpu() if requested by user.
From-SVN: r226725
2015-08-07 16:23:53 +00:00
Francois-Xavier Coudert
00ebbcbc59
* runtime/compile_options.c (set_options): Fix typos.
...
From-SVN: r226686
2015-08-06 17:42:19 +00:00
Thomas Schwinge
17abb5ac38
libgfortran LIBGFOR_MINIMAL enhancements.
...
Based on GCC trunk r220892, for nvptx-none:
=== gfortran Summary ===
# of expected passes [-31320-]{+32117+}
# of unexpected failures [-7222-]{+6821+}
# of expected failures 78
# of unresolved testcases [-6441-]{+6158+}
# of untested testcases [-432-]{+391+}
# of unsupported tests 639
libgfortran/
* caf/single.c (caf_runtime_error): Revert 2014-11-28 changes.
* runtime/minimal.c (STRERR_MAXSZ): Don't define.
(runtime_error_at, sys_abort): Bring more in line with the
non-LIBGFOR_MINIMAL code.
(runtime_warning_at, internal_error): New functions.
From-SVN: r221363
2015-03-11 22:42:56 +01:00
Jerry DeLisle
351b443252
re PR fortran/61933 (Inquire on internal units)
...
2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/61933
* io/inquire.c (inquire_via_unit): Set existing to true if a
gfc_unit stucture was found for the given unit number.
* runtime/error.c (translate_error): Add case for
LIBERROR_INQUIRE_INTERNAL_UNIT.
From-SVN: r219631
2015-01-15 03:57:29 +00:00
Jakub Jelinek
5624e564d2
Update copyright years.
...
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Bernd Schmidt
ee95f9288a
Add support for a minimal version of libgfortran for accelerator targets.
...
* Makefile.am (AM_CFLAGS): Add -DLIBGFOR_MINIMAL if LIBGFOR_MINIMAL.
(gfor_io_src, gfor_heper_src, gfor_src): Split into minimal and
always included sources.
* Makefile.in: Regenerate.
* configure.ac (LIBGFOR_MINIMAL): New AM_CONDITIONAL.
* configure: Regenerate.
* caf/single.c (caf_runtime_error): Don't print messages if
LIBGFOR_MINIMAL.
* runtime/compile_options.c (fatal_error_in_progress,
show_signal, backtrace_handler, maybe_find_addr2line): Guard with
!defined LIBGFOR_MINIMAL.
(set_options): Likewise for the backtrace code.
* runtime/minimal.c: New file.
From-SVN: r218170
2014-11-28 17:39:15 +00:00
Janne Blomqvist
581d232670
PR 60324 Unbounded stack allocations in libgfortran.
...
2014-11-13 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/60324
* configure: Regenerated.
* configure.ac (AM_CFLAGS): Add Werror=vla.
* libgfortran.h (gfc_alloca): Remove macro.
(fc_strdup_notrim): New prototype.
* intrinsics/access.c (access_func): Use fc_strdup rather than
stack allocation.
* intrinsics/chdir.c (chdir_i4_sub): Likewise.
(chdir_i8_sub): Likewise.
* intrinsics/chmod.c (chmod_internal): New function, move logic
here.
(chmod_func): Call chmod_internal.
* intrinsics/env.c (getenv): Use fc_strdup rather than stack
allocation.
(get_environment_variable_i4): Likewise.
* intrinsics/execute_command_line.c (execute_command_line):
Likewise.
* intrinsics/hostnm.c (hostnm_0): New function, use static buffer
rather than VLA.
(hostnm_i4_sub): Call hostnm_0.
(hostnm_i8_sub): Likewise.
(hostnm): Likewise.
* intrinsics/link.c (link_internal): New function, use fc_strdup
rather than stack allocation.
(link_i4_sub): Call link_internal.
(link_i8_sub): Likewise.
(link_i4): Likewise.
(link_i8): Likewise.
* intrinsics/perror.c (perror_sub): Use fc_strdup rather than
stack allocation.
* intrinsics/random.c (random_seed_i4): Use static buffer rather
than VLA, use _Static_assert to make sure it's big enough.
* intrinsics/rename.c (rename_internal): New function, use
fc_strdup rather than stack allocation.
(rename_i4_sub): Call rename_internal.
(rename_i8_sub): Likewise.
(rename_i4): Likewise.
(rename_i8): Likewise.
* intrinsics/stat.c (stat_i4_sub_0): Use fc_strdup rather than
stack allocation.
(stat_i8_sub_0): Likewise.
* intrinsics/symlink.c (symlnk_internal): New function, use
fc_strdup rather than stack allocation.
(symlnk_i4_sub): Call symlnk_internal.
(symlnk_i8_sub): Likewise.
(symlnk_i4): Likewise.
(symlnk_i8): Likewise.
* intrinsics/system.c (system_sub): Use fc_strdup rather than
stack allocation.
* intrinsics/unlink.c (unlink_i4_sub): Likewise.
* io/file_pos.c (READ_CHUNK): Make it a macro rather than variable.
* io/list_read.c (nml_get_obj_data): Use fixed stack buffer, fall
back to xmalloc/free for large sizes.
* io/read.c (read_f): Likewise.
* io/transfer.c (MAX_READ): Make it a macro rather than variable.
(WRITE_CHUNK): Likewise.
* io/write_float.def (write_float): Use fixed stack buffer, fall
back to xmalloc/free for large sizes.
* runtime/string.c (fc_strdup_notrim): New function.
From-SVN: r217480
2014-11-13 14:05:01 +02:00
Janne Blomqvist
9cbecd06be
PR 47007 and 61847 Locale failures in libgfortran.
...
2014-11-10 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/47007
PR libfortran/61847
* config.h.in: Regenerated.
* configure: Regenerated.
* configure.ac (AC_CHECK_HEADERS_ONCE): Check for xlocale.h.
(AC_CHECK_FUNCS_ONCE): Check for newlocale, freelocale, uselocale,
strerror_l.
* io/io.h (locale.h): Include.
(xlocale.h): Include if present.
(c_locale): New variable.
(old_locale): New variable.
(old_locale_ctr): New variable.
(old_locale_lock): New variable.
(st_parameter_dt): Add old_locale member.
* io/transfer.c (data_transfer_init): Set locale to "C" if doing
formatted transfer.
(finalize_transfer): Reset locale to previous.
* io/unit.c (c_locale): New variable.
(old_locale): New variable.
(old_locale_ctr): New variable.
(old_locale_lock): New variable.
(init_units): Init c_locale, init old_locale_lock.
(close_units): Free c_locale.
* runtime/error.c (locale.h): Include.
(xlocale.h): Include if present.
(gf_strerror): Use strerror_l if available. Reset locale to
LC_GLOBAL_LOCALE for strerror_r branch.
2014-11-10 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/47007
PR libfortran/61847
* gfortran.texi: Add note about locale issues to thread-safety
section.
From-SVN: r217273
2014-11-10 02:17:16 +02:00
Janne Blomqvist
70480968b4
PR 63589 Fix splitting of PATH in find_addr2line.
...
2014-10-20 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/63589
* configure.ac: Check for strtok_r.
* runtime/main.c (gfstrtok_r): Fallback implementation of
strtok_r.
(find_addr2line): Use strtok_r to split PATH.
* config.h.in: Regenerated.
* configure: Regenerated.
From-SVN: r216449
2014-10-20 10:53:37 +03:00
Jakub Jelinek
62c986afde
* runtime/memory.c (xmallocarray): Avoid division for the common case.
...
From-SVN: r213593
2014-08-04 17:46:33 +02:00
Francois-Xavier Coudert
77777b33a8
stop.c: Use C11 _Noreturn.
...
* runtime/stop.c: Use C11 _Noreturn.
* libgfortran.h: Use C11 _Noreturn in prototypes.
Move REALPART, IMAGPART and COMPLEX_ASSIGN macros...
* intrinsics/c99_functions.c: ... here.
From-SVN: r212327
2014-07-07 09:13:48 +00:00
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
Janne Blomqvist
d74fd3c72b
Introduce xrealloc, use it.
...
2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
* libgfortran.h (xrealloc): New prototype.
* runtime/memory.c (xrealloc): New function.
* io/fbuf.c (fbuf_alloc): Use xrealloc.
* io/list_read.c (push_char_default): Likewise.
(push_char4): Likewise.
From-SVN: r210948
2014-05-26 23:56:45 +03:00
Janne Blomqvist
410e3e10dd
PR 60324 Handle long path names, don't use PATH_MAX.
...
2014-05-23 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/60324
* runtime/string.c: Include stdlib.h.
From-SVN: r210827
2014-05-23 00:17:29 +03:00
Janne Blomqvist
4269f19c09
PR 60324 Handle long path names, don't use PATH_MAX.
...
From-SVN: r210738
2014-05-22 06:51:25 +03:00
Richard Sandiford
f0bcf62899
Update copyright years in libgfortran/
...
From-SVN: r206296
2014-01-02 22:25:45 +00:00
Tobias Burnus
fa86f4f917
gfortran.h (gfc_option_t): Add fpe_summary.
...
2013-06-17 Tobias Burnus <burnus@net-b.de>
* gfortran.h (gfc_option_t): Add fpe_summary.
* gfortran.texi (_gfortran_set_options): Update.
* invoke.texi (-ffpe-summary): Add doc.
* lang.opt (ffpe-summary): Add flag.
* options.c (gfc_init_options, gfc_handle_option): Handle it.
(gfc_handle_fpe_option): Renamed from gfc_handle_fpe_trap_option,
also handle fpe_summary.
* trans-decl.c (create_main_function): Update
_gfortran_set_options call.
2013-06-17 Tobias Burnus <burnus@net-b.de>
* libgfortran.h (compile_options_t) Add fpe_summary.
(get_fpu_except_flags): New prototype.
* runtime/compile_options.c (set_options, init_compile_options):
Handle fpe_summary.
* runtime/stop.c (report_exception): New function.
(stop_numeric, stop_numeric_f08, stop_string, error_stop_string,
error_stop_numeric): Call it.
* config/fpu-387.h (get_fpu_except_flags): New function.
* config/fpu-aix.h (get_fpu_except_flags): New function.
* config/fpu-generic.h (get_fpu_except_flags): New function.
* config/fpu-glibc.h (get_fpu_except_flags): New function.
* config/fpu-glibc.h (get_fpu_except_flags): New function.
* configure.ac: Check for fpxcp.h.
* configure: Regenerate.
* config.h.in: Regenerate.
From-SVN: r200147
2013-06-17 09:48:21 +02:00
David Edelsohn
19f0e98f58
environ.c: Include unistd.h.
...
* runtime/environ.c: Include unistd.h.
* runtime/pause.c: Test HAVE_UNISTD_H.
* runtime/stop.c: Same.
* io/open.c: Same.
* io/unix.c: Same.
* io/read.c (si_max): Protect declaration of value.
From-SVN: r198603
2013-05-04 17:23:11 -04:00
Janne Blomqvist
f5e3ed2d42
Use C99 bool instead of enum try.
...
2013-03-19 Janne Blomqvist <jb@gcc.gnu.org>
* libgfortran.h: Include stdbool.h.
(enum try): Remove.
(notify_std): Change return type to bool.
* intrinsics/chmod.c: Don't include stdbool.h.
* intrinsics/execute_command_line.c: Likewise.
* io/format.c: Likewise.
* io/list_read.c (nml_parse_qualifier): Change return type to bool.
(nml_read_obj): Likewise.
(nml_get_obj_data): Likewise.
* io/transfer.c (read_block_form): Fix comment.
(write_buf): Change return type to bool.
* io/write.c: Don't include stdbool.h.
* io/write_float.def (output_float): Change return type to bool.
(output_float_FMT_G_ ## x): Change type of result variable.
* runtime/error.c (notify_std): Change return type to bool.
From-SVN: r196791
2013-03-19 13:13:32 +02:00
Janus Weil
c362c6741d
re PR fortran/55978 (class_optional_2.f90 -Os fails)
...
2013-02-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/55978
* runtime/in_pack_generic.c (internal_pack): Return if base_addr is
NULL.
2013-02-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/55978
* gfortran.dg/class_optional_2.f90: Uncomment some cases which work now.
From-SVN: r195814
2013-02-06 20:39:35 +01:00
Richard Sandiford
e3c063ceda
Update copyright years in libgfortran.
...
From-SVN: r195167
2013-01-14 18:20:58 +00:00
Janus Weil
f0f67c96c3
re PR libfortran/36044 (user-requested backtrace)
...
2012-12-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/36044
* gfortran.h (gfc_isym_id): Add GFC_ISYM_BACKTRACE.
* intrinsic.c (add_subroutines): Add "backtrace".
* intrinsic.texi (BACKTRACE): Document BACKTRACE intrinsic.
2012-12-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/36044
* gfortran.map: Add _gfortran_backtrace.
* libgfortran.h: Rename 'show_backtrace' and export.
* runtime/backtrace.c (show_backtrace): Rename to 'backtrace'.
Don't show message. Close file descriptor. Export.
* runtime/compile_options.c (backtrace_handler): Renamed
'show_backtrace'. Move message outside.
* runtime/error.c (sys_abort): Ditto.
From-SVN: r194648
2012-12-20 19:15:13 +01:00
Thomas Koenig
4ed3a4d41b
re PR libfortran/54736 (GFORTRAN_CONVERT_UNIT causes malloc error on several platforms)
...
2012-10-06 Thomas König <tkoenig@gcc.gnu.org>
PR libfortran/54736
* runtime/environ.c (search_unit): Correct logic
for binary search.
(mark_single): Fix index errors.
From-SVN: r192158
2012-10-06 13:04:35 +00:00
Tobias Burnus
7ed26a671c
chmod.c (chmod_func): On MinGW, don't set is_dir
...
2012-06-01 Tobias Burnus <burnus@net-b.de>
* intrinsics/chmod.c (chmod_func): On MinGW, don't set is_dir
* and
fix octal-mode handling.
* io/unit.c (get_internal_unit): Add cast.
* io/unix.c (min): Undef "min" before defining it.
* runtime/backtrace.c (show_backtrace): Move label into
ifndef __MINGW__ block.
From-SVN: r188098
2012-06-01 07:53:31 +02:00
Tobias Burnus
4179e59afa
re PR libfortran/53444 (Accommodate non-compliant strerror_r() on VxWorks.)
...
2012-05-23 Tobias Burnus <burnus@net-b.de>
PR libfortran/53444
* acinclude.m4 (LIBGFOR_CHECK_STRERROR_R): Add configure checks
* for
two- and three-argument versions of strerror_r.
* configure.ac (LIBGFOR_CHECK_STRERROR_R): Use it.
* runtime/error.c (gf_strerror): Handle two-argument version
of strerror_r.
* config.h.in: Regenerate.
* configure: Regenerate.
From-SVN: r187796
2012-05-23 10:34:06 +02:00
Janne Blomqvist
80b91c0b39
PR 52428 Range checking when reading integer values.
...
gcc/fortran ChangeLog:
2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/52428
* gfortran.texi: Update _gfortran_set_options documentation.
* invoke.texi: Remove runtime behavior description of
-fno-range-check.
* trans-decl.c (create_main_function): Don't pass the range-check
setting to the library.
libgfortran ChangeLog:
2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/52428
* io/io.h (max_value): Rename to si_max, remove second argument.
* io/list_read.c (convert_integer): Use unsigned types when
parsing the digits, set max value depending on the sign.
* io/read.c (max_value): Rename to si_max, remove second argument,
simplify.
(read_decimal): Set max value depending on sign, always check
overflow.
(read_radix): Calculate max unsigned value directly.
* libgfortran.h (struct compile_options_t): Remove range_check
field.
* runtime/compile_options.c (set_options): Skip handling
options[7].
(init_compile_options): Don't set removed field.
gcc/testsuite ChangeLog:
2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/52428
* gfortran.dg/int_range_io_1.f90: New test.
From-SVN: r187478
2012-05-14 22:39:23 +03:00
Janne Blomqvist
68ee9c0807
Fix handling of temporary files.
...
2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
* gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
algorithm for choosing temp directory.
2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
* config.h.in: Regenerated.
* configure: Regenerated.
* configure.ac: Add checks for getegid and __secure_getenv.
* io/unix.c (P_tmpdir): Fallback definition for macro.
(tempfile_open): New function.
(tempfile): Use secure_getenv, call tempfile_open to try each
directory in turn.
* libgfortran.h (DEFAULT_TMPDIR): Remove macro.
(secure_getenv): New macro/prototype.
* runtime/environ.c (secure_getenv): New function.
(variable_table): Rename GFORTRAN_TMPDIR to TMPDIR.
* runtime/main.c (find_addr2line): Use secure_getenv.
From-SVN: r187190
2012-05-05 09:30:51 +03:00
Janne Blomqvist
1a0fd3d33a
Combined get_mem and internal_malloc_size.
...
2012-03-26 Janne Blomqvist <jb@gcc.gnu.org>
* runtime/memory.c (get_mem): Rename to xmalloc, check for zero
size.
(internal_malloc_size): Remove.
* libgfortran.h (get_mem): Rename to xmalloc.
(internal_malloc_size): Remove prototype.
* Makefile.am (i_iall_c): Fix dependency.
(i_iany_c): Likewise.
(i_iparity_c): Likewise.
(i_norm2_c): Likewise.
(i_parity_c): Likewise.
* Makefile.in: Regenerated.
* m4/parity.m4: Fix typo in comment.
* generated/all_l1.c: Regenerated.
* generated/all_l16.c: Regenerated.
* generated/all_l2.c: Regenerated.
* generated/all_l4.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/any_l1.c: Regenerated.
* generated/any_l16.c: Regenerated.
* generated/any_l2.c: Regenerated.
* generated/any_l4.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/bessel_r10.c: Regenerated.
* generated/bessel_r16.c: Regenerated.
* generated/bessel_r4.c: Regenerated.
* generated/bessel_r8.c: Regenerated.
* generated/count_16_l.c: Regenerated.
* generated/count_1_l.c: Regenerated.
* generated/count_2_l.c: Regenerated.
* generated/count_4_l.c: Regenerated.
* generated/count_8_l.c: Regenerated.
* generated/cshift1_16.c: Regenerated.
* generated/cshift1_4.c: Regenerated.
* generated/cshift1_8.c: Regenerated.
* generated/eoshift1_16.c: Regenerated.
* generated/eoshift1_4.c: Regenerated.
* generated/eoshift1_8.c: Regenerated.
* generated/eoshift3_16.c: Regenerated.
* generated/eoshift3_4.c: Regenerated.
* generated/eoshift3_8.c: Regenerated.
* generated/iall_i1.c: Regenerated.
* generated/iall_i16.c: Regenerated.
* generated/iall_i2.c: Regenerated.
* generated/iall_i4.c: Regenerated.
* generated/iall_i8.c: Regenerated.
* generated/iany_i1.c: Regenerated.
* generated/iany_i16.c: Regenerated.
* generated/iany_i2.c: Regenerated.
* generated/iany_i4.c: Regenerated.
* generated/iany_i8.c: Regenerated.
* generated/in_pack_c10.c: Regenerated.
* generated/in_pack_c16.c: Regenerated.
* generated/in_pack_c4.c: Regenerated.
* generated/in_pack_c8.c: Regenerated.
* generated/in_pack_i1.c: Regenerated.
* generated/in_pack_i16.c: Regenerated.
* generated/in_pack_i2.c: Regenerated.
* generated/in_pack_i4.c: Regenerated.
* generated/in_pack_i8.c: Regenerated.
* generated/in_pack_r10.c: Regenerated.
* generated/in_pack_r16.c: Regenerated.
* generated/in_pack_r4.c: Regenerated.
* generated/in_pack_r8.c: Regenerated.
* generated/iparity_i1.c: Regenerated.
* generated/iparity_i16.c: Regenerated.
* generated/iparity_i2.c: Regenerated.
* generated/iparity_i4.c: Regenerated.
* generated/iparity_i8.c: Regenerated.
* generated/matmul_c10.c: Regenerated.
* generated/matmul_c16.c: Regenerated.
* generated/matmul_c4.c: Regenerated.
* generated/matmul_c8.c: Regenerated.
* generated/matmul_i1.c: Regenerated.
* generated/matmul_i16.c: Regenerated.
* generated/matmul_i2.c: Regenerated.
* generated/matmul_i4.c: Regenerated.
* generated/matmul_i8.c: Regenerated.
* generated/matmul_l16.c: Regenerated.
* generated/matmul_l4.c: Regenerated.
* generated/matmul_l8.c: Regenerated.
* generated/matmul_r10.c: Regenerated.
* generated/matmul_r16.c: Regenerated.
* generated/matmul_r4.c: Regenerated.
* generated/matmul_r8.c: Regenerated.
* generated/maxloc0_16_i1.c: Regenerated.
* generated/maxloc0_16_i16.c: Regenerated.
* generated/maxloc0_16_i2.c: Regenerated.
* generated/maxloc0_16_i4.c: Regenerated.
* generated/maxloc0_16_i8.c: Regenerated.
* generated/maxloc0_16_r10.c: Regenerated.
* generated/maxloc0_16_r16.c: Regenerated.
* generated/maxloc0_16_r4.c: Regenerated.
* generated/maxloc0_16_r8.c: Regenerated.
* generated/maxloc0_4_i1.c: Regenerated.
* generated/maxloc0_4_i16.c: Regenerated.
* generated/maxloc0_4_i2.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc0_4_r10.c: Regenerated.
* generated/maxloc0_4_r16.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/maxloc0_8_i1.c: Regenerated.
* generated/maxloc0_8_i16.c: Regenerated.
* generated/maxloc0_8_i2.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/maxloc0_8_r10.c: Regenerated.
* generated/maxloc0_8_r16.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/maxloc1_16_i1.c: Regenerated.
* generated/maxloc1_16_i16.c: Regenerated.
* generated/maxloc1_16_i2.c: Regenerated.
* generated/maxloc1_16_i4.c: Regenerated.
* generated/maxloc1_16_i8.c: Regenerated.
* generated/maxloc1_16_r10.c: Regenerated.
* generated/maxloc1_16_r16.c: Regenerated.
* generated/maxloc1_16_r4.c: Regenerated.
* generated/maxloc1_16_r8.c: Regenerated.
* generated/maxloc1_4_i1.c: Regenerated.
* generated/maxloc1_4_i16.c: Regenerated.
* generated/maxloc1_4_i2.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r10.c: Regenerated.
* generated/maxloc1_4_r16.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_8_i1.c: Regenerated.
* generated/maxloc1_8_i16.c: Regenerated.
* generated/maxloc1_8_i2.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r10.c: Regenerated.
* generated/maxloc1_8_r16.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxval_i1.c: Regenerated.
* generated/maxval_i16.c: Regenerated.
* generated/maxval_i2.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r10.c: Regenerated.
* generated/maxval_r16.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc0_16_i1.c: Regenerated.
* generated/minloc0_16_i16.c: Regenerated.
* generated/minloc0_16_i2.c: Regenerated.
* generated/minloc0_16_i4.c: Regenerated.
* generated/minloc0_16_i8.c: Regenerated.
* generated/minloc0_16_r10.c: Regenerated.
* generated/minloc0_16_r16.c: Regenerated.
* generated/minloc0_16_r4.c: Regenerated.
* generated/minloc0_16_r8.c: Regenerated.
* generated/minloc0_4_i1.c: Regenerated.
* generated/minloc0_4_i16.c: Regenerated.
* generated/minloc0_4_i2.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minloc0_4_r10.c: Regenerated.
* generated/minloc0_4_r16.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
* generated/minloc0_8_i1.c: Regenerated.
* generated/minloc0_8_i16.c: Regenerated.
* generated/minloc0_8_i2.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/minloc0_8_r10.c: Regenerated.
* generated/minloc0_8_r16.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/minloc1_16_i1.c: Regenerated.
* generated/minloc1_16_i16.c: Regenerated.
* generated/minloc1_16_i2.c: Regenerated.
* generated/minloc1_16_i4.c: Regenerated.
* generated/minloc1_16_i8.c: Regenerated.
* generated/minloc1_16_r10.c: Regenerated.
* generated/minloc1_16_r16.c: Regenerated.
* generated/minloc1_16_r4.c: Regenerated.
* generated/minloc1_16_r8.c: Regenerated.
* generated/minloc1_4_i1.c: Regenerated.
* generated/minloc1_4_i16.c: Regenerated.
* generated/minloc1_4_i2.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r10.c: Regenerated.
* generated/minloc1_4_r16.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_8_i1.c: Regenerated.
* generated/minloc1_8_i16.c: Regenerated.
* generated/minloc1_8_i2.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r10.c: Regenerated.
* generated/minloc1_8_r16.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minval_i1.c: Regenerated.
* generated/minval_i16.c: Regenerated.
* generated/minval_i2.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r10.c: Regenerated.
* generated/minval_r16.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/norm2_r10.c: Regenerated.
* generated/norm2_r16.c: Regenerated.
* generated/norm2_r4.c: Regenerated.
* generated/norm2_r8.c: Regenerated.
* generated/pack_c10.c: Regenerated.
* generated/pack_c16.c: Regenerated.
* generated/pack_c4.c: Regenerated.
* generated/pack_c8.c: Regenerated.
* generated/pack_i1.c: Regenerated.
* generated/pack_i16.c: Regenerated.
* generated/pack_i2.c: Regenerated.
* generated/pack_i4.c: Regenerated.
* generated/pack_i8.c: Regenerated.
* generated/pack_r10.c: Regenerated.
* generated/pack_r16.c: Regenerated.
* generated/pack_r4.c: Regenerated.
* generated/pack_r8.c: Regenerated.
* generated/parity_l1.c: Regenerated.
* generated/parity_l16.c: Regenerated.
* generated/parity_l2.c: Regenerated.
* generated/parity_l4.c: Regenerated.
* generated/parity_l8.c: Regenerated.
* generated/product_c10.c: Regenerated.
* generated/product_c16.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i1.c: Regenerated.
* generated/product_i16.c: Regenerated.
* generated/product_i2.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r10.c: Regenerated.
* generated/product_r16.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/reshape_c10.c: Regenerated.
* generated/reshape_c16.c: Regenerated.
* generated/reshape_c4.c: Regenerated.
* generated/reshape_c8.c: Regenerated.
* generated/reshape_i16.c: Regenerated.
* generated/reshape_i4.c: Regenerated.
* generated/reshape_i8.c: Regenerated.
* generated/reshape_r10.c: Regenerated.
* generated/reshape_r16.c: Regenerated.
* generated/reshape_r4.c: Regenerated.
* generated/reshape_r8.c: Regenerated.
* generated/shape_i16.c: Regenerated.
* generated/shape_i4.c: Regenerated.
* generated/shape_i8.c: Regenerated.
* generated/spread_c10.c: Regenerated.
* generated/spread_c16.c: Regenerated.
* generated/spread_c4.c: Regenerated.
* generated/spread_c8.c: Regenerated.
* generated/spread_i1.c: Regenerated.
* generated/spread_i16.c: Regenerated.
* generated/spread_i2.c: Regenerated.
* generated/spread_i4.c: Regenerated.
* generated/spread_i8.c: Regenerated.
* generated/spread_r10.c: Regenerated.
* generated/spread_r16.c: Regenerated.
* generated/spread_r4.c: Regenerated.
* generated/spread_r8.c: Regenerated.
* generated/sum_c10.c: Regenerated.
* generated/sum_c16.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i1.c: Regenerated.
* generated/sum_i16.c: Regenerated.
* generated/sum_i2.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r10.c: Regenerated.
* generated/sum_r16.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/sum_r8.c: Regenerated.
* generated/transpose_c10.c: Regenerated.
* generated/transpose_c16.c: Regenerated.
* generated/transpose_c4.c: Regenerated.
* generated/transpose_c8.c: Regenerated.
* generated/transpose_i16.c: Regenerated.
* generated/transpose_i4.c: Regenerated.
* generated/transpose_i8.c: Regenerated.
* generated/transpose_r10.c: Regenerated.
* generated/transpose_r16.c: Regenerated.
* generated/transpose_r4.c: Regenerated.
* generated/transpose_r8.c: Regenerated.
* generated/unpack_c10.c: Regenerated.
* generated/unpack_c16.c: Regenerated.
* generated/unpack_c4.c: Regenerated.
* generated/unpack_c8.c: Regenerated.
* generated/unpack_i1.c: Regenerated.
* generated/unpack_i16.c: Regenerated.
* generated/unpack_i2.c: Regenerated.
* generated/unpack_i4.c: Regenerated.
* generated/unpack_i8.c: Regenerated.
* generated/unpack_r10.c: Regenerated.
* generated/unpack_r16.c: Regenerated.
* generated/unpack_r4.c: Regenerated.
* generated/unpack_r8.c: Regenerated.
* intrinsics/cshift0.c: Use xmalloc.
* intrinsics/ctime.c: Likewise.
* intrinsics/date_and_time.c: Likewise.
* intrinsics/eoshift0.c: Likewise.
* intrinsics/eoshift2.c: Likewise.
* intrinsics/getlog.c: Likewise.
* intrinsics/pack_generic.c: Likewise.
* intrinsics/reshape_generic.c: Likewise.
* intrinsics/spread_generic.c: Likewise.
* intrinsics/string_intrinsics_inc.c: Likewise.
* intrinsics/transpose_generic.c: Likewise.
* intrinsics/unpack_generic.c: Likewise.
* io/fbuf.c: Likewise.
* io/format.c: Likewise.
* io/intrinsics.c: Likewise.
* io/list_read.c: Likewise.
* io/open.c: Likewise.
* io/transfer.c: Likewise.
* io/unit.c: Likewise.
* io/unix.c: Likewise.
* io/write.c: Likewise.
* m4/bessel.m4: Likewise.
* m4/cshift1.m4: Likewise.
* m4/eoshift1.m4: Likewise.
* m4/eoshift3.m4: Likewise.
* m4/iforeach.m4: Likewise.
* m4/ifunction.m4: Likewise.
* m4/ifunction_logical.m4: Likewise.
* m4/in_pack.m4: Likewise.
* m4/matmul.m4: Likewise.
* m4/matmull.m4: Likewise.
* m4/pack.m4: Likewise.
* m4/reshape.m4: Likewise.
* m4/shape.m4: Likewise.
* m4/spread.m4: Likewise.
* m4/transpose.m4: Likewise.
* m4/unpack.m4: Likewise.
* runtime/convert_char.c: Likewise.
* runtime/environ.c: Likewise.
* runtime/in_pack_generic.c: Likewise.
From-SVN: r185806
2012-03-26 18:16:05 +03:00
Janne Blomqvist
f4471acbe3
Use calloc instead of malloc and memset.
...
2012-03-25 Janne Blomqvist <jb@gcc.gnu.org>
* runtime/memory.c (xcalloc): New function.
* libgfortran.h (xcalloc): New prototype.
* io/list_read.c (push_char): Use xcalloc instead of get_mem and
memset.
(l_push_char): Likewise.
* io/unit.c (insert_unit): Likewise.
(get_internal_unit): Likewise.
* io/unix.c (open_internal): Likewise.
(open_internal4): Likewise.
(fd_to_stream): Likewise.
From-SVN: r185773
2012-03-25 08:48:49 +03:00
Tobias Burnus
21d1335b2a
libgfortran.h (descriptor_dimension, [...]): Rename _lbound to lower_bound and data to base_addr.
...
2012-03-10 Tobias Burnus <burnus@net-b.de>
* libgfortran.h (descriptor_dimension, GFC_DIMENSION_LBOUND,
GFC_DIMENSION_EXTENT, GFC_DIMENSION_SET, GFC_DESCRIPTOR_DATA,
GFC_ARRAY_DESCRIPTOR): Rename _lbound to lower_bound and
data to base_addr.
* intrinsics/cshift0.c (size0, cshift0): Handle data to
base_addr rename.
* intrinsics/date_and_time.c (date_and_time, secnds, itime_i4,
itime_i8, gmtime_i4, gmtime_i8, ltime_i4, ltime_i8): Ditto.
* intrinsics/dtime.c (dtime_sub): Ditto.
* intrinsics/eoshift0.c (eoshift0): Ditto.
* intrinsics/eoshift2.c (eoshift2): Ditto.
* intrinsics/etime.c (etime_sub): Ditto.
* intrinsics/iso_c_binding.c (c_f_pointer_u0): Ditto.
* intrinsics/move_alloc.c (move_alloc): Ditto.
* intrinsics/pack_generic.c (pack_internal, pack,
pack_s_internal): Ditto.
* intrinsics/random.c (arandom_r4, arandom_r8, arandom_r10,
arandom_r16, random_seed_i4, random_seed_i8): Ditto.
* intrinsics/reshape_generic.c (reshape_internal): Ditto.
* intrinsics/spread_generic.c (spread_internal,
spread_internal_scalar, spread, spread_scalar): Ditto.
* intrinsics/stat.c (stat_i4_sub_0, stat_i8_sub_0, fstat_i4_sub,
fstat_i8_sub): Ditto.
* intrinsics/transpose_generic.c (transpose_internal): Ditto.
* intrinsics/unpack_generic.c (unpack_bounds, unpack_internal,
unpack1, unpack0, unpack0_char4): Ditto.
* m4/bessel.m4 (bessel_jn_r'rtype_kind`,
* bessel_yn_r'rtype_kind`):
Ditto.
* m4/cshift0.m4 (cshift0_'rtype_code`): Ditto.
* m4/cshift1.m4 (cshift1): Ditto.
* m4/eoshift1.m4 (eoshift1): Ditto.
* m4/eoshift3.m4 (eoshift3): Ditto.
* m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Ditto.
* m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Ditto.
* m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
* Ditto.
* m4/in_pack.m4 (internal_pack_'rtype_ccode`): Ditto.
* m4/in_unpack.m4 (internal_unpack_'rtype_ccode`): Ditto.
* m4/matmul.m4 (matmul_'rtype_code`): Ditto.
* m4/matmull.m4 (matmul_'rtype_code`): Ditto.
* m4/pack.m4 (pack_'rtype_code`): Ditto.
* m4/reshape.m4 (reshape_'rtype_ccode`): Ditto.
* m4/shape.m4 (shape_'rtype_kind`): Ditto.
* m4/spread.m4 (spread_'rtype_code`): Ditto.
* m4/transpose.m4 (transpose_'rtype_code`): Ditto.
* m4/unpack.m4 (unpack0_'rtype_code`, unpack1_'rtype_code`):
* Ditto.
* runtime/bounds.c (count_0): Ditto.
* runtime/in_pack_generic.c (internal_pack): Ditto.
* runtime/in_unpack_generic.c (internal_unpack): Ditto.
* generated/cshift0_r4.c: Regenerated.
* generated/unpack_r8.c: Regenerated.
* generated/cshift0_c10.c: Regenerated.
* generated/in_unpack_i1.c: Regenerated.
* generated/eoshift1_16.c: Regenerated.
* generated/iany_i16.c: Regenerated.
* generated/reshape_i4.c: Regenerated.
* generated/parity_l16.c: Regenerated.
* generated/in_unpack_r16.c: Regenerated.
* generated/iparity_i1.c: Regenerated.
* generated/minloc0_16_r10.c: Regenerated.
* generated/minloc1_16_i8.c: Regenerated.
* generated/bessel_r8.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc1_8_i1.c: Regenerated.
* generated/sum_c10.c: Regenerated.
* generated/maxloc0_8_r10.c: Regenerated.
* generated/unpack_r16.c: Regenerated.
* generated/maxloc1_16_i1.c: Regenerated.
* generated/minloc1_4_i1.c: Regenerated.
* generated/unpack_i4.c: Regenerated.
* generated/in_pack_i1.c: Regenerated.
* generated/cshift0_i1.c: Regenerated.
* generated/minloc0_16_i4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/unpack_i2.c: Regenerated.
* generated/matmul_r16.c: Regenerated.
* generated/maxloc0_16_r8.c: Regenerated.
* generated/maxloc1_8_i16.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/pack_c10.c: Regenerated.
* generated/in_unpack_c8.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/in_pack_c16.c: Regenerated.
* generated/parity_l1.c: Regenerated.
* generated/in_pack_i2.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/pack_r4.c: Regenerated.
* generated/matmul_r8.c: Regenerated.
* generated/pack_i1.c: Regenerated.
* generated/minloc0_16_r16.c: Regenerated.
* generated/cshift0_c8.c: Regenerated.
* generated/minloc1_4_i16.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/product_i2.c: Regenerated.
* generated/maxval_r10.c: Regenerated.
* generated/minloc0_16_r8.c: Regenerated.
* generated/in_pack_i8.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/minloc0_8_i16.c: Regenerated.
* generated/minloc1_8_i2.c: Regenerated.
* generated/matmul_l8.c: Regenerated.
* generated/spread_r10.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/reshape_r16.c: Regenerated.
* generated/cshift0_i16.c: Regenerated.
* generated/minloc1_8_r10.c: Regenerated.
* generated/iparity_i8.c: Regenerated.
* generated/minloc0_16_i8.c: Regenerated.
* generated/minloc1_8_i1.c: Regenerated.
* generated/maxloc0_16_r10.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc0_16_i8.c: Regenerated.
* generated/maxloc1_16_i16.c: Regenerated.
* generated/reshape_i8.c: Regenerated.
* generated/all_l16.c: Regenerated.
* generated/cshift1_8.c: Regenerated.
* generated/matmul_c10.c: Regenerated.
* generated/pack_r16.c: Regenerated.
* generated/transpose_r10.c: Regenerated.
* generated/maxloc1_16_i2.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/reshape_r8.c: Regenerated.
* generated/product_r10.c: Regenerated.
* generated/spread_c10.c: Regenerated.
* generated/reshape_r4.c: Regenerated.
* generated/in_unpack_i4.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minloc1_16_r16.c: Regenerated.
* generated/norm2_r8.c: Regenerated.
* generated/iany_i2.c: Regenerated.
* generated/eoshift3_8.c: Regenerated.
* generated/maxloc1_16_r8.c: Regenerated.
* generated/maxloc0_16_r16.c: Regenerated.
* generated/cshift0_i8.c: Regenerated.
* generated/all_l1.c: Regenerated.
* generated/minloc1_16_r10.c: Regenerated.
* generated/spread_i16.c: Regenerated.
* generated/minloc1_8_r16.c: Regenerated.
* generated/spread_r16.c: Regenerated.
* generated/matmul_c8.c: Regenerated.
* generated/pack_r10.c: Regenerated.
* generated/reshape_r10.c: Regenerated.
* generated/sum_r10.c: Regenerated.
* generated/count_8_l.c: Regenerated.
* generated/minloc1_16_i16.c: Regenerated.
* generated/maxloc0_16_i2.c: Regenerated.
* generated/count_1_l.c: Regenerated.
* generated/unpack_c16.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/minloc1_16_i1.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/in_unpack_r8.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/in_unpack_r4.c: Regenerated.
* generated/unpack_i1.c: Regenerated.
* generated/cshift0_r8.c: Regenerated.
* generated/spread_i2.c: Regenerated.
* generated/minloc1_4_r10.c: Regenerated.
* generated/minloc1_16_i2.c: Regenerated.
* generated/minloc0_16_i2.c: Regenerated.
* generated/eoshift3_16.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc1_16_r10.c: Regenerated.
* generated/maxloc1_4_i16.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/parity_l2.c: Regenerated.
* generated/maxloc0_16_i16.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/in_unpack_r10.c: Regenerated.
* generated/maxloc1_8_i2.c: Regenerated.
* generated/iparity_i2.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/iall_i4.c: Regenerated.
* generated/maxloc0_4_i16.c: Regenerated.
* generated/cshift0_i4.c: Regenerated.
* generated/in_unpack_c10.c: Regenerated.
* generated/unpack_c8.c: Regenerated.
* generated/transpose_c8.c: Regenerated.
* generated/in_unpack_c16.c: Regenerated.
* generated/product_c16.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/minloc0_4_i1.c: Regenerated.
* generated/minloc0_8_r16.c: Regenerated.
* generated/in_unpack_i16.c: Regenerated.
* generated/reshape_c16.c: Regenerated.
* generated/pack_i4.c: Regenerated.
* generated/minval_r10.c: Regenerated.
* generated/maxloc0_4_r10.c: Regenerated.
* generated/unpack_i8.c: Regenerated.
* generated/minloc1_16_r8.c: Regenerated.
* generated/pack_c16.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/spread_r8.c: Regenerated.
* generated/minloc0_16_r4.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/matmul_r4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/any_l4.c: Regenerated.
* generated/cshift0_r16.c: Regenerated.
* generated/maxloc1_16_r4.c: Regenerated.
* generated/in_pack_r10.c: Regenerated.
* generated/iall_i1.c: Regenerated.
* generated/product_i1.c: Regenerated.
* generated/maxloc0_4_i1.c: Regenerated.
* generated/maxloc0_8_r16.c: Regenerated.
* generated/minloc1_8_i16.c: Regenerated.
* generated/reshape_c10.c: Regenerated.
* generated/matmul_l4.c: Regenerated.
* generated/cshift0_c16.c: Regenerated.
* generated/spread_r4.c: Regenerated.
* generated/sum_r16.c: Regenerated.
* generated/in_unpack_c4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/unpack_i16.c: Regenerated.
* generated/norm2_r4.c: Regenerated.
* generated/maxloc1_4_r16.c: Regenerated.
* generated/in_pack_r4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/parity_l8.c: Regenerated.
* generated/minval_i2.c: Regenerated.
* generated/transpose_c10.c: Regenerated.
* generated/cshift0_r10.c: Regenerated.
* generated/cshift0_i2.c: Regenerated.
* generated/spread_c4.c: Regenerated.
* generated/maxval_r16.c: Regenerated.
* generated/unpack_c10.c: Regenerated.
* generated/bessel_r4.c: Regenerated.
* generated/minloc0_8_i1.c: Regenerated.
* generated/product_c10.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i2.c: Regenerated.
* generated/transpose_c4.c: Regenerated.
* generated/in_pack_c8.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/maxloc1_4_i2.c: Regenerated.
* generated/maxloc1_4_i1.c: Regenerated.
* generated/iall_i8.c: Regenerated.
* generated/iany_i8.c: Regenerated.
* generated/sum_c16.c: Regenerated.
* generated/spread_i8.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/pack_i2.c: Regenerated.
* generated/unpack_r10.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/iany_i4.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/in_pack_r8.c: Regenerated.
* generated/spread_i1.c: Regenerated.
* generated/maxval_i16.c: Regenerated.
* generated/pack_c8.c: Regenerated.
* generated/iparity_i16.c: Regenerated.
* generated/matmul_c16.c: Regenerated.
* generated/eoshift1_8.c: Regenerated.
* generated/any_l16.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/transpose_c16.c: Regenerated.
* generated/reshape_c4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/count_16_l.c: Regenerated.
* generated/minloc0_16_i1.c: Regenerated.
* generated/minloc1_16_r4.c: Regenerated.
* generated/maxloc0_8_i1.c: Regenerated.
* generated/matmul_i1.c: Regenerated.
* generated/sum_i2.c: Regenerated.
* generated/cshift1_4.c: Regenerated.
* generated/minloc0_4_i2.c: Regenerated.
* generated/bessel_r10.c: Regenerated.
* generated/matmul_c4.c: Regenerated.
* generated/parity_l4.c: Regenerated.
* generated/in_unpack_i2.c: Regenerated.
* generated/product_i16.c: Regenerated.
* generated/maxloc0_16_i4.c: Regenerated.
* generated/minloc0_4_r10.c: Regenerated.
* generated/transpose_i16.c: Regenerated.
* generated/matmul_l16.c: Regenerated.
* generated/any_l1.c: Regenerated.
* generated/minval_r16.c: Regenerated.
* generated/shape_i16.c: Regenerated.
* generated/in_pack_c4.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/iany_i1.c: Regenerated.
* generated/matmul_i16.c: Regenerated.
* generated/maxloc0_16_r4.c: Regenerated.
* generated/spread_c8.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/minval_i16.c: Regenerated.
* generated/pack_r8.c: Regenerated.
* generated/matmul_r10.c: Regenerated.
* generated/shape_i8.c: Regenerated.
* generated/eoshift1_4.c: Regenerated.
* generated/minloc1_16_i4.c: Regenerated.
* generated/transpose_r16.c: Regenerated.
* generated/spread_c16.c: Regenerated.
* generated/maxloc0_8_i16.c: Regenerated.
* generated/minval_i1.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/in_pack_r16.c: Regenerated.
* generated/iall_i16.c: Regenerated.
* generated/minloc0_8_r10.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/transpose_i4.c: Regenerated.
* generated/maxloc0_4_i2.c: Regenerated.
* generated/iall_i2.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/minloc0_4_r16.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/in_pack_i16.c: Regenerated.
* generated/spread_i4.c: Regenerated.
* generated/cshift0_c4.c: Regenerated.
* generated/minloc0_4_i16.c: Regenerated.
* generated/sum_r8.c: Regenerated.
* generated/minloc0_16_i16.c: Regenerated.
* generated/sum_i1.c: Regenerated.
* generated/all_l2.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/shape_i4.c: Regenerated.
* generated/maxval_i1.c: Regenerated.
* generated/norm2_r10.c: Regenerated.
* generated/unpack_c4.c: Regenerated.
* generated/maxloc0_16_i1.c: Regenerated.
* generated/all_l4.c: Regenerated.
* generated/maxloc1_16_i8.c: Regenerated.
* generated/sum_i16.c: Regenerated.
* generated/maxloc1_8_r16.c: Regenerated.
* generated/minloc1_4_r16.c: Regenerated.
* generated/maxloc1_16_r16.c: Regenerated.
* generated/transpose_i8.c: Regenerated.
* generated/minloc0_8_i2.c: Regenerated.
* generated/product_r16.c: Regenerated.
* generated/in_pack_c10.c: Regenerated.
* generated/maxloc0_4_r16.c: Regenerated.
* generated/pack_c4.c: Regenerated.
* generated/bessel_r16.c: Regenerated.
* generated/norm2_r16.c: Regenerated.
* generated/in_unpack_i8.c: Regenerated.
* generated/maxloc1_16_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/eoshift3_4.c: Regenerated.
* generated/maxloc1_8_r10.c: Regenerated.
* generated/matmul_i8.c: Regenerated.
* generated/matmul_i4.c: Regenerated.
* generated/reshape_i16.c: Regenerated.
* generated/matmul_i2.c: Regenerated.
* generated/transpose_r8.c: Regenerated.
* generated/transpose_r4.c: Regenerated.
* generated/cshift1_16.c: Regenerated.
* generated/maxloc1_4_r10.c: Regenerated.
* generated/iparity_i4.c: Regenerated.
* generated/in_pack_i4.c: Regenerated.
* generated/maxloc0_8_i2.c: Regenerated.
* generated/unpack_r4.c: Regenerated.
* generated/count_4_l.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/any_l2.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/pack_i8.c: Regenerated.
* generated/count_2_l.c: Regenerated.
* generated/reshape_c8.c: Regenerated.
* generated/maxval_i2.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
From-SVN: r185177
2012-03-10 18:22:31 +01:00
Janne Blomqvist
869eea243d
Remove configure check for unused fdopen.
...
2012-01-12 Janne Blomqvist <jb@gcc.gnu.org>
* configure.ac: Remove check for fdopen.
* runtime/backtrace.c (CAN_PIPE): Fix comment, remove check for
fdopen.
* configure: Regenerated.
* config.h.in: Regenerated.
From-SVN: r183124
2012-01-12 12:30:45 +02:00
Janne Blomqvist
cb735e3800
PR 51803 Avoid malloc if getcwd fails or is not available.
...
2012-01-12 Janne Blomqvist <jb@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR libfortran/51803
* runtime/main.c (store_exe_path): Avoid malloc if getcwd fails or
is not available.
Co-Authored-By: Tobias Burnus <burnus@net-b.de>
From-SVN: r183122
2012-01-12 11:58:34 +02:00
Tobias Burnus
4dec0a42c3
main.c (store_exe_path): Fix absolute path detection for Windows.
...
2012-01-11 Tobias Burnus <burnus@net-b.de>
* runtime/main.c (store_exe_path): Fix absolute path
detection for Windows.
From-SVN: r183094
2012-01-11 15:39:28 +01:00
Janne Blomqvist
8763317661
PR 51803 Handle getcwd failure and lack of the function better.
...
2012-01-11 Janne Blomqvist <jb@gcc.gnu.org>
Mike Stump <mikestump@comcast.net>
PR libfortran/51803
* runtime/main.c (store_exe_path): Handle getcwd failure and lack
of the function better.
Co-Authored-By: Mike Stump <mikestump@comcast.net>
From-SVN: r183090
2012-01-11 09:34:16 +02:00
Tobias Burnus
59c615478d
re PR fortran/51197 (Backtrace information less useful)
...
2012-01-10 Tobias Burnus <burnus@net-b.de>
PR fortran/51197
* runtime/compile_options.c (show_signal): List
more signals.
From-SVN: r183057
2012-01-10 10:32:29 +01:00
Harald Anlauf
3881a3dee8
re PR fortran/51197 (Backtrace information less useful)
...
2012-01-09 Harald Anlauf <anlauf@gmx.de>
Tobias Burnus <burnus@net-b.de>
PR fortran/51197
* runtime/backtrace.c (show_backtrace): Modify wording written
before the backtrace.
* runtime/compile_options.c (show_signal): New function.
(backtrace_handler): Use it.
Co-Authored-By: Tobias Burnus <burnus@net-b.de>
From-SVN: r183030
2012-01-09 20:53:27 +01:00
Janne Blomqvist
c492b9d035
PR 51090 Fix r181288 to conform to GNU style
...
From-SVN: r181290
2011-11-11 18:38:11 +02:00
Janne Blomqvist
ee66e604c3
PR 51090 Check that getenv result != NULL before proceeding.
...
2011-11-11 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/51090
* runtime/main.c (find_addr2line): NULL check before proceeding.
From-SVN: r181288
2011-11-11 18:31:47 +02:00
Janne Blomqvist
7454437875
Configure cleanup.
...
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
* configure.ac (AC_STDC_HEADERS): Remove.
(AC_HEADER_TIME): Remove.
(AC_HAVE_HEADERS, AC_CHECK_HEADERS): Move into a single invocation
of AC_CHECK_HEADERS_ONCE, don't check for presence of C89 headers.
(AC_CHECK_MEMBERS): Use single invocation.
(AC_CHECK_FUNCS): Move into single invocation of
AC_CHEC_FUNCS_ONCE, don't check for presence of C89 functions.
* config.h.in: Regenerate.
* configure: Regenerate.
* intrinsics/clock.c: Include time.h.
(mclock): Assume clock() is present.
(mclock8): Likewise.
* intrinsics/ctime.c (strctime): Assume strftime is present.
(fdate): Assume time() is present.
(fdate_sub): Likewise.
(ctime): Likewise.
* intrinsics/date_and_time.c: Don't provide abs macro.
(HAVE_NO_DATE_TIME): Remove code related to macro which is never
set.
* intrinsics/execute_command_line.c: Assume stdlib.h is present.
* intrinsics/exit.c: Likewise.
* intrinsics/extends_type_of.c: Likewise.
* intrinsics/gerror.c: Assume strerror() is present.
* intrinsics/kill.c: Assume signal.h is present.
* intrinsics/malloc.c: Assume stdlib.h is present.
* intrinsics/move_alloc.c: Likewise.
* intrinsics/perror.c: Assume perror() is present.
* intrinsics/signal.c: Assume signal.h is present.
* intrinsics/stat.c: Assume stdlib.h is present.
* intrinsics/system.c: Likewise.
* intrinsics/time.c: Include time.h, assume time() is present.
* intrinsics/time_1.h: Conditionally include sys/time.h,
unconditionally time.h.
(gf_cputime): Do division in double, fallback using clock().
(gf_gettime): Assume time() is present.
* intrinsics/umask.c: Assume stdlib.h is present.
* runtime/backtrace.c: Likewise.
* runtime/compile_options.c: Assume signal.h is present, assume
C89 signals are present.
* runtime/error.c: Assume signal.h and stdlib.h are present.
From-SVN: r181227
2011-11-09 20:25:58 +02:00
Janne Blomqvist
161f270d4e
PR 46686 Fix incorrect comment.
...
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/46686
* runtime/backtrace.c (show_backtrace): Fix incorrect comment.
From-SVN: r181217
2011-11-09 19:52:11 +02:00
Janne Blomqvist
1ff101ff12
PR 46686 Implement backtrace with _Unwind_Backtrace from libgcc.
...
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/46686
* configure.ac: Don't check execinfo.h, backtrace,
backtrace_symbols_fd. Check execve instead of execvp. Call
GCC_CHECK_UNWIND_GETIPINFO.
* runtime/backtrace.c: Don't include unused headers, include
limits.h and unwind.h.
(CAN_FORK): Check execve instead of execvp.
(GLIBC_BACKTRACE): Remove.
(bt_header): Conform to gdb backtrace format.
(struct bt_state): New struct.
(trace_function): New function.
(show_backtrace): Use _Unwind_Backtrace from libgcc instead of
glibc backtrace functions.
* Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* config.h.in: Regenerated.
* configure: Regenerated.
From-SVN: r181209
2011-11-09 18:04:42 +02:00
Francois-Xavier Coudert
6ef982714c
re PR libfortran/47972 (error.c:158:7: warning: return makes pointer from integer without a cast)
...
PR libfortran/47972
* runtime/error.c (gf_strerror): Silence warning.
From-SVN: r181180
2011-11-08 21:58:47 +00:00
Andreas Schwab
53390685bd
ctime.c: Include <stdlib.h>.
...
* libgfortran/intrinsics/ctime.c: Include <stdlib.h>.
* libgfortran/intrinsics/getlog.c: Likewise.
* libgfortran/runtime/stop.c: Likewise.
From-SVN: r176675
2011-07-23 11:06:04 +00:00
Tobias Burnus
f6da75edeb
error.c (sys_abort): Change argument list from "()" to "(void)".
...
2011-07-09 Tobias Burnus <burnus@net-b.de>
* runtime/error.c (sys_abort): Change argument list
from "()" to "(void)".
From-SVN: r176109
2011-07-09 23:22:44 +02:00
Thomas Koenig
a787f6f9ec
memory.c (internal_malloc_size): If size is zero, allocate a single byte.
...
2011-07-05 Thomas Koenig <tkoenig@gcc.gnu.org>
* runtime/memory.c (internal_malloc_size): If size is zero,
allocate a single byte.
* m4/pack.m4 (pack_'rtype_code`): Don't check for zero size
for the argument of internal_malloc_size.
* m4/spread.m4 (spread_'rtype_code`): Likewise.
* m4/eoshift1.m4 (eoshift1): Don't allocate twice. Don't check
for zero size for the argument of internal_malloc_size.
* m4/eoshift3.m4: Don't check for zero size for the argument of
internal_malloc_size.
* intrinsics/pack_generic.c (pack_internal): Likewise.
(pack_s_internal): Likewise.
* intrinsics/cshift0.c (cshift0): Likewise.
* intrinsics/spread_generic.c (spread_internal): Likewise.
* intrinsics/eoshift0.c (eoshift0): Likewise.
* intrinsics/eoshift2.c (eoshift2): Likewise.
* generated/eoshift1_16.c: Regenerated.
* generated/eoshift1_4.c: Regenerated.
* generated/eoshift1_8.c: Regenerated.
* generated/eoshift3_16.c: Regenerated.
* generated/eoshift3_4.c: Regenerated.
* generated/eoshift3_8.c: Regenerated.
* generated/pack_c10.c: Regenerated.
* generated/pack_c16.c: Regenerated.
* generated/pack_c4.c: Regenerated.
* generated/pack_c8.c: Regenerated.
* generated/pack_i16.c: Regenerated.
* generated/pack_i1.c: Regenerated.
* generated/pack_i2.c: Regenerated.
* generated/pack_i4.c: Regenerated.
* generated/pack_i8.c: Regenerated.
* generated/pack_r10.c: Regenerated.
* generated/pack_r16.c: Regenerated.
* generated/pack_r4.c: Regenerated.
* generated/pack_r8.c: Regenerated.
* generated/spread_c10.c: Regenerated.
* generated/spread_c16.c: Regenerated.
* generated/spread_c4.c: Regenerated.
* generated/spread_c8.c: Regenerated.
* generated/spread_i16.c: Regenerated.
* generated/spread_i1.c: Regenerated.
* generated/spread_i2.c: Regenerated.
* generated/spread_i4.c: Regenerated.
* generated/spread_i8.c: Regenerated.
* generated/spread_r10.c: Regenerated.
* generated/spread_r16.c: Regenerated.
* generated/spread_r4.c: Regenerated.
* generated/spread_r8.c: Regenerated.
From-SVN: r175880
2011-07-05 18:16:17 +00:00