PR fortran/31764
* simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
even for non constant arguments.
* gfortran.dg/new_line.f90: Add new checks.
From-SVN: r124482
2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/31201
* gfortran.h: Add runtime error codes from libgfortran.h. Define
MAX_UNIT_NUMBER.
* trans.c (gfc_trans_runtime_check): Update the format of runtime error
messages to match library runtime errors. Use call to new library
function runtime_error_at().
* trans.h: Add prototype for new function gfc_trans_io_runtime_check.
Add declaration for library functions runtime_error_at and
generate_error.
* trans_io.c (gfc_trans_io_runtime_check): New function.
(set_parameter_value): Add error checking for UNIT numbers.
(set_parameter_ref): Initialize the users variable to zero.
(gfc_trans_open): Move setting of unit number to after setting of common
flags so that runtime error trapping can be detected.
(gfc_trans_close): Likewise. (build_filepos): Likewise.
(gfc_trans_inquire): Likewise. (build_dt): Likewise.
* trans-decl.c: Add declarations for runtime_error_at and
generate_error. (gfc_build_builtin_function_decls): Build function
declarations for runtime_error_at and generate_error.
Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
From-SVN: r124480
2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/31201
* runtime/error.c (runtime_error_at): New function.
(generate_error): Export this function.
* gfortran.map: Add _gfortran_generate_error and
_gfortran_runtime_error_at.
* libgfortran.h: Add comment to reference error codes in front end.
(library_start): Locate prototype with library_end macro and add
a new comment. Add prototype for runtime_error_at. Export prototype for
generate_error.
* io/lock.c (library_start): Fix check for error condition.
* io/transfer.c (data_transfer_init): Add library check.
From-SVN: r124479
2007-05-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31540
* resolve.c (resolve_fl_procedure): Resolve constant character
lengths.
2007-05-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31540
* gfortran.dg/char_result_4.f90: New test.
From-SVN: r124476
2007-05-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31540
* resolve.c (resolve_fl_procedure): Resolve constant character
lengths.
2007-05-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31540
* gfortran.dg/char_result_4.f90: New test.
From-SVN: r124475
2007-05-06 Paolo Carlini <pcarlini@suse.de>
* config/locale/generic/c_locale.cc: Don't use __builtin_huge_val*
when __*_HAS_INFINITY__ is false.
From-SVN: r124470
* config/pa/pa.md: Split tgd_load, tld_load and tie_load
into pic and non-pic versions. Mark r19 as used for
tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used
for tgd_load, tld_load and tie_load .
* config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic
version of tgd_load, tld_load and tie_load depending on the
value of flag_pic.
From-SVN: r124468
gcc/fortran:
2007-05-04 Daniel Franke <franke.daniel@gmail.com>
PR fortran/31760
* intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
by gfc_check_fn_r to avoid checks for scalarity.
* check.c (gfc_check_besn): Removed check for scalarity.
(gfc_check_g77_math1): Removed.
* intrinsic.h (gfc_check_g77_math1): Removed.
gcc/testsuite:
2007-05-04 Daniel Franke <franke.daniel@gmail.com>
PR fortran/31760
* gfortran.dg/erf.f90: New test.
* gfortran.dg/besxy.f90: New test.
[gcc/fortran/ChangeLog was already committed in r124441 by accident]
From-SVN: r124446
* crtstuff.c (HIDDEN_DTOR_LIST_END): New macro.
(__do_global_dtors_aux): Use more paranoid loop to run
destructors if HIDDEN_DTOR_LIST_END.
(__DTOR_END__): Export as a hidden symbol when HIDDEN_DTOR_LIST_END.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r124444
* opts.c (decode_options): Do not fiddle with inlining
parameters in case of optimizing for size.
* ipa-inline.c (cgraph_decide_recursive_inlining): When optimizing
for size do nothing.
(cgraph_decide_inlining_of_small_function): When optimizing for
size never inline functions increasing caller size.
(cgraph_early_inlining): Inline for size when optimizing for size.
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r124431
PR libfortran/31210
* io/transfer.c (transfer_character): Avoid passing a NULL
pointer as source to the transfer routines, if the string length
is zero.
From-SVN: r124428
* config/bfin/bfin.md (<optab>di3): Now a define_expand which expands
logical operations piecewise.
(<optab>di_zesidi_di, <optab>di_sesidi_di, negdi2, one_cmpldi2,
zero_extendsidi2, subdi_di_zesidi, subdi_zesidi_di, subdi_di_sesidi,
subdi_sesidi_di): Delete.
(add_with_carry): Produce carry in CC instead of a DREG to shorten
the generated sequence. Allow three-reg add in constraints. Rewrite
the rtl expression for carry to avoid zero_extend of a constant.
(sub_with_carry): New pattern.
(adddi3, subdi3): Change into define_expand. For subtract, generate a
different sequence not involving jumps.
(notbi): Now a named pattern.
From-SVN: r124414
* doc/invoke.texi (i386 and x86-64 Options) [-mpc32, -mpc64, -mpc80]:
Add the note about a significant loss of accuracy of some
mathematical routines when these options are used.
From-SVN: r124413
* haifa-sched.c (rtx_vec_t): New typedef.
(contributes_to_priority_p): Extract piece of priority () into new
static function.
(priority): Use the function. Add assertion.
(rank_for_schedule, set_priorities): Add assertion to check that
insn's priority is initialized.
(clear_priorities, calc_priorities): Change signature. Make it update
all relevant insns. Update all callers ('add_to_speculative_block ()'
and 'create_block_check_twin ()').
* sched-int.h (struct haifa_insn_data): Remove field 'priority_known'.
Add new field 'priority_status'.
(INSN_PRIORITY_STATUS): New macro.
(INSN_PRIORITY_KNOWN): Change to use INSN_PRIORITY_STATUS.
From-SVN: r124410
* sched-ebb.c (debug_ebb_dependencies): New static function.
(init_ready_list): Use it.
* sched-rgn.c (debug_dependencies): Split into 'debug_dependencies ()'
with changed signature and 'debug_rgn_dependencies ()'.
(debug_rgn_dependencies): New static function.
(init_ready_list): Use it.
* sched-int.h (debug_dependencies): Declare.
From-SVN: r124409