2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
* s-osinte-linux-kfreebsd.ads (SC_NPROCESSORS_ONLN): New
constant constant for sysconf call.
(bit_field): New packed boolean type used by cpu_set_t.
(cpu_set_t): New type corresponding to the C type with
the same name. Note that on the Ada side we use a bit
field array for the affinity mask. There is not need
for the C macro for setting individual bit.
(pthread_setaffinity_np): New imported routine.
* Makefile.in: Use s-tasinf-linux.ads and s-tasinf-linux.adb
on GNU/kFreeBSD.
From-SVN: r133978
* fold-const.c (fold) <ARRAY_REF>: New case. Try to fold constant
reference in constructor with non self-referential type.
ada/
* utils2.c (build_binary_op): Fold ARRAY_REF and ARRAY_RANGE_REF too.
From-SVN: r133977
Removal of Return with Depressed Stack Pointer support
* tree.h (TYPE_RETURNS_STACK_DEPRESSED): Delete.
(ECF_SP_DEPRESSED): Likewise.
(ECF_LIBCALL_BLOCK, ECF_NOVOPS): Adjust.
* calls.c (emit_call_1): Do not test ECF_SP_DEPRESSED.
(flags_from_decl_or_type): Do not test TYPE_RETURNS_STACK_DEPRESSED.
(expand_call): Do not test ECF_SP_DEPRESSED.
* dse.c (dse_step0): Do not test TYPE_RETURNS_STACK_DEPRESSED.
* function.c (keep_stack_depressed): Delete.
(handle_epilogue_set): Likewise.
(update_epilogue_consts): Likewise.
(emit_equiv_load): Likewise.
(thread_prologue_and_epilogue_insns): Remove support for Return with
Depressed Stack Pointer.
* print-tree.c (print_node): Do not test TYPE_RETURNS_STACK_DEPRESSED.
ada/
* gigi.h (create_subprog_type): Remove returns_with_dsp parameter.
* decl.c (gnat_to_gnu_entity): Adjust for above new prototype.
* utils.c (create_subprog_type): Remove returns_with_dsp parameter.
* trans.c (gnat_to_gnu) <N_Return_Statement>: Remove code dealing with
Return by Depressed Stack Pointer.
From-SVN: r133976
2008-04-07 Johannes Singler <singler@ira.uka.de>
* include/parallel/multiway_merge.h:
Moved decisions to compiletime instead of runtime.
* include/parallel/losertree.h:
Removed obsolete variants, added variant that uses pointers
in the loser tree.
* include/parallel/types.h:
Remove obsolete settings options from enum.
* include/parallel/features.h:
Remove obsolete compile-time switches.
* include/parallel/compiletime_settings.h:
Remove obsolete variant that copies back *after* sorting.
* include/parallel/tags.h:
Add one new tag for compile-time switch.
* include/parallel/merge.h:
Adapt to changes in multiway_merge.h.
* include/parallel/multiway_mergesort.h:
Adapt to changes in multiway_merge.h.
Factor out splitting variants.
Remove obsolete variant that copies back *after* sorting.
* include/parallel/sort.h:
Adapt to changes in multiway_mergesort.h.
* testsuite/25_algorithms/sort/35588.cc:
Added test case from / for PR 35588.
From-SVN: r133975
2008-04-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/35400
* tree-vrp.c (vrp_evaluate_conditional): Only query value-range
information from SSA_NAMEs.
* gcc.dg/torture/pr35400.c: New testcase.
* g++.dg/torture/pr35400.C: Likewise.
From-SVN: r133967
2008-04-06 Tobias Schlter <tobi@gcc.gnu.org>
PR fortran/35832
fortran/
* io.c (io_tag): Add field 'value'. Split 'spec' field in
existing io_tags.
(match_etag, match_vtag, match_ltag): Split parsing in two steps
to give better error messages.
testsuite/
* gfortran.dg/io_constraints_2.f90: Adapt to new error message.
From-SVN: r133964
2008-04-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/35842
* tree-ssa-address.c (fixed_address_object_p): Adjust to match
is_gimple_invariant_address.
From-SVN: r133963
gcc/
* gcc.c (default_compilers): Sync Fortran extensions list with
that in fortran/lang-specs.h.
* doc/invoke.texi: Likewise.
* dbxout.c (get_lang_number): Use "GNU Fortran" in "GNU F95".
* dwarf2out.c (gen_compile_unit_die): Likewise.
gcc/fortran/
* f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
From-SVN: r133960
* dump-parse-tree.c: Use fprintf, fputs and fputc instead of
gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
functions and make them static. Add new gfc_dump_parse_tree
function.
* gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
(gfc_status, gfc_status_char): Delete prototypes.
* error.c (gfc_status, gfc_status_char): Remove functions.
* scanner.c (gfc_new_file): Use printf instead of gfc_status.
* options.c (gfc_init_options): Rename verbose into dump_parse_tree.
(gfc_handle_module_path_options): Use gfc_fatal_error instead of
gfc_status and exit.
(gfc_handle_option): Rename verbose into dump_parse_tree.
From-SVN: r133958
* decl.c (rest_of_type_decl_compilation_no_defer): New local function
used to process all the variants of the specified type.
(gnat_to_gnu_entity): Invoke rest_of_type_decl_compilation for enumeral
types too. Call rest_of_type_decl_compilation_no_defer if undeferring.
(rest_of_type_decl_compilation): Likewise.
* utils.c (gnat_pushdecl): Propagate the name to all variants of type.
From-SVN: r133957
PR target/12329
* config/i386/i386.c (ix86_function_regparm): Error if regparm(3)
attribute is used for nested functions.
testsuite/ChangeLog:
PR target/12329
* gcc.target/i386/pr12329.c: New test.
From-SVN: r133954
2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25829 28655
* gfortran.dg/f2003_io_1.f03: New test.
* gfortran.dg/f2003_io_2.f03: New test.
* gfortran.dg/f2003_io_3.f03: New test.
* gfortran.dg/f2003_io_4.f03: New test.
* gfortran.dg/f2003_io_5.f03: New test.
* gfortran.dg/f2003_io_6.f03: New test.
* gfortran.dg/f2003_io_7.f03: New test.
From-SVN: r133945
2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/25829 28655
* dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
* gfortran.h (gfc_statement): Add ST_WAIT enumerator.
(gfc_open): Add pointers for decimal, encoding, round, sign,
asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
encoding, pending, round, sign, size, id.
(gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
asynchronous, blank, decimal, delim, pad, round, sign.
(gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
* trans-stmt.h (gfc_trans_wait): New function prototype.
* trans.c (gfc_trans_code): Add case for EXEC_WAIT.
* io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
(gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
tags. (gfc_resolve_open): Remove comment around check for allowed
values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
ROUND, and SIGN. (match_dt_element): Add matching for new tags.
(gfc_free_wait): New function. (gfc_resolve_wait): New function.
(match_wait_element): New function. (gfc_match_wait): New function.
* resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
(resolve_code): Add case for EXEC_WAIT.
* st.c (gfc_free_statement): Add case for EXEC_WAIT.
* trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
(gfc_build_io_library_fndecls): Add function declaration for st_wait.
(gfc_trans_open): Add mask bits for new I/O tags.
(gfc_trans_inquire): Add mask bits for new I/O tags.
(gfc_trans_wait): New translation function.
(build_dt): Add mask bits for new I/O tags.
* match.c (gfc_match_if) Add matcher for "wait".
* match.h (gfc_match_wait): Prototype for new function.
* ioparm.def: Add new I/O parameter definitions.
* parse.c (decode_statement): Add match for "wait" statement.
(next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
From-SVN: r133944
2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/25829 28655
* gfortran.map: Add new symbol, _gfortran_st_wait.
* libgfortran.h (st_paramter_common): Add new I/O parameters.
* open.c (st_option decimal_opt[], st_option encoding_opt[],
st_option round_opt[], st_option sign_opt[], st_option async_opt[]): New
parameter option arrays. (edit_modes): Add checks for new parameters.
(new_unit): Likewise. (st_open): Likewise.
* list_read.c (CASE_SEPERATORS): Add ';' as a valid separator.
(eat_separator): Handle deimal comma. (read_logical): Fix whitespace.
(parse_real): Handle decimal comma. (read_real): Handle decimal comma.
* read.c (read_a): Use decimal status flag to allow comma in place of a
decimal point. (read_f): Allow comma as acceptable character in float.
According to decimal flag, substitute a period for a comma.
(read_x): If decimal status flag is comma, disable the read_comma flag,
not allowing comma as a delimiter, an extension otherwise.
* io.h: (unit_decimal, unit_encoding, unit_round, unit_sign,
unit_async): New enumerators. Add all new I/O parameters.
* unix.c (unix_stream, int_stream): Add io_mode asychronous I/O control.
(move_pos_offset, fd_alloc_w_at): Fix some whitespace.
(fd_sfree): Use new enumerator. (fd_read): Likewise.
(fd_write): Likewise. (fd_close): Fix whitespace.
(fd_open): Use new enumertors. (tempfile, regular_file,
open_external): Fix whitespace. (output_stream, error_stream): Set
method. (stream_offset): Fix whitespace.
* transfer.c: (st_option decimal_opt[], sign_opt[], blank_opt[]): New
option arrays. (formatted_transfer_scalar): Set sf_read_comma flag
based on new decimal_status flag. (data_transfer_init): Initialize new
parameters. Add checks for decimal, sign, and blank. (st_wait): New stub.
* format.c: (format_lex): Add format specifiers DP, DC, and D.
(parse_format_list): Parse the new specifiers.
* write.c (write_decimal): Use new sign enumerators to set the sign.
(write_complex): Handle decimal comma and semi-colon separator.
(nml_write_obj): Likewise.
* write_float.def: Revise sign enumerators. (calculate_sign): Use new
sign enumerators. (output_float): Likewise. Use new decimal_status flag
to set the decimal character to a point or a comma.
From-SVN: r133943
* tree-dump.c (dump_enable_all): Remove prototype; do not accept
letter argument.
(dump_files): Update.
(enable_rtl_dump_file): Do not accept letter argument.
* tree-pass.h (dump_file_info): Remove letter argument.
* toplev.c (decode_d_option): Update -da handling.
* toplev.h (enable_rtl_dump_file): Update prototype.
* passes.c (register_one_dump_file): Do not accept IPA argument; work
it out based on pass type.
(register_dump_files_1): Likewise.
(init_optimization_passes): Update register_one_dump_file calls.
(execute_one_pass): Sanity check that IPA passes are called at IPA level
and RTL passes at RTL level.
(execute_pass_list): IPA pass can not be after or subpass of
GIMPLE/RTL pass.
(execute_ipa_pass_list): Handle IPA subpasses of IPA subpasses and
disallov RTL subpasses of IPA subpasses.
From-SVN: r133930
* tree-cfg.c (need_fake_edge_p): Return false for calls to
builtins that return exactly once and do not throw. Cache call to
call_expr_flags.
From-SVN: r133929
PR binutils/4334
* acx.m4 (ACX_CHECK_CYGWIN_CAT_WORKS): New macro to check that
cygwin builds are not running in textmode.
* configure.ac: Run ACX_XHEXK_CYGWIN_CAT_WORKS for cygwin hosted
builds.
* configure: Regenerate.
From-SVN: r133894
2008-04-04 Richard Guenther <rguenther@suse.de>
PR middle-end/35823
* fold-const.c (optimize_minmax_comparison): Use the correct
type for the constant in the simplified comparison.
* gnat.dg/pr35823.adb: New testcase.
From-SVN: r133893
* config/i386/driver-i386.c (describe_cache): Add l2_sizekb argument.
Pass L2 size as "--param l2-cache-size" to the compiler.
(decode_l2_cache): New function to decode L2 cache parameters using
0x8000006 extended cpuid function.
(detect_caches_amd): Determine parameters of L2 cache using
decode_l2_caches function.
(decode_caches_intel): Decode L2 cache parameters.
(detect_caches_intel): Determine L2 cache parameters using
decode_caches_intel and decode_l2_caches functions.
From-SVN: r133890