2006-12-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29642
* trans-expr.c (gfc_conv_variable): A character expression with
the VALUE attribute needs an address expression; otherwise all
other expressions with this attribute must not be dereferenced.
(gfc_conv_function_call): Pass expressions with the VALUE
attribute by value, using gfc_conv_expr.
* symbol.c (check_conflict): Add strings for INTENT OUT, INOUT
and VALUE. Apply all the constraints associated with the VALUE
attribute.
(gfc_add_value): New function.
(gfc_copy_attr): Call it for VALUE attribute.
* decl.c (match_attr_spec): Include the VALUE attribute.
(gfc_match_value): New function.
* dump-parse-tree.c (gfc_show_attr): Include VALUE.
* gfortran.h : Add value to the symbol_attribute structure and
add a prototype for gfc_add_value
* module.c (mio_internal_string): Include AB_VALUE in enum.
(attr_bits): Provide the VALUE string for it.
(mio_symbol_attribute): Read or apply the VLUE attribute.
* trans-types.c (gfc_sym_type): Variables with the VLAUE
attribute are not passed by reference!
* resolve.c (was_declared): Add value to those that return 1.
(resolve_symbol): Value attribute requires dummy attribute.
* match.h : Add prototype for gfc_match_public.
* parse.c (decode_statement): Try to match a VALUE statement.
2006-12-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29642
* gfortran.dg/value_1.f90 : New test.
* gfortran.dg/value_2.f90 : New test.
* gfortran.dg/value_3.f90 : New test.
* gfortran.dg/value_4.f90 : New test.
* gfortran.dg/value_4.c : Called from value_4.f90.
From-SVN: r119461
2006-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR target/30040
* config/i386/driver-i386.c: Include "coretypes.h" and "tm.h".
(bit_SSSE3): New.
(host_detect_local_cpu): Check -mtune= vs. -march=. Rewrite
processor detection.
* config/i386/i386.h (CC1_CPU_SPEC): Add -mtune=native for
-march=native if there is no -mtune=*.
* config/i386/x-i386 (driver-i386.o): Also depend on $(TM_H)
coretypes.h.
From-SVN: r119454
2006-12-02 Howard Hinnant <hhinnant@apple.com>
* acinclude.m4: Allow OPTIMIZE_CXXFLAGS to be set by configure.host.
* configure.host: Set OPTIMIZE_CXXFLAGS to -fvisibility-inlines-hidden
for x86/darwin.
* configure: Regenerate.
From-SVN: r119450
* config/i386/i386.c (pentium4_cost, nocona_cost): Update
32bit memcpy/memset decriptors.
(decide_alg): With -minline-all-stringops and sizes that are best
to be copied via libcall still work hard enough to pick non-libcall
strategy.
Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>
From-SVN: r119445
* decl.c (poplevel): Check DECL_INITIAL invariant.
(duplicate_decls): Preserve DECL_INITIAL when eliminating
a new definition in favour of an old declaration.
(start_preparsed_function): Define and document value of
DECL_INITIAL before and after routine.
(finish_function): Check DECL_INITIAL invariant.
* parser.c
(cp_parser_function_definition_from_specifiers_and_declarator):
Skip duplicate function definitions.
From-SVN: r119427
* fold-const.c (fold_binary) <LT_EXPR>: Use the precision of the
type instead of the size of its mode to compute the highest and
lowest possible values. Still check the size of the mode before
flipping the signedness of the comparison.
From-SVN: r119422
PR c++/30022
* typeck.c (type_after_usual_arithmetic_conversions):
Fix assertion for vector types.
(build_binary_op): Use temporary for inner type of vector types.
* g++.dg/ext/vector5.C: New test.
From-SVN: r119416
2006-12-01 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/29568
* gfortran.dg/convert_implied_open.f90: Change to
new default record length.
* gfortran.dg/unf_short_record_1.f90: Adapt to
new error message.
* gfortran.dg/unformatted_subrecords_1.f90: New test.
2006-12-01 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/29568
* gfortran.h (gfc_option_t): Add max_subrecord_length.
(top level): Define MAX_SUBRECORD_LENGTH.
* lang.opt: Add option -fmax-subrecord-length=.
* trans-decl.c: Add new function set_max_subrecord_length.
(gfc_generate_function_code): If we are within the main
program and max_subrecord_length has been set, call
set_max_subrecord_length.
* options.c (gfc_init_options): Add defaults for
max_subrecord_lenght, convert and record_marker.
(gfc_handle_option): Add handling for
-fmax_subrecord_length.
* invoke.texi: Document the new default for
-frecord-marker=<n>.
2006-12-01 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/29568
* libgfortran/libgfortran.h (compile_options_t): Add
record_marker. (top level): Define GFC_MAX_SUBRECORD_LENGTH.
* runtime/compile_options.c (set_record_marker): Change
default to four-byte record marker.
(set_max_subrecord_length): New function.
* runtime/error.c (translate_error): Change error message
for short record on unformatted read.
* io/io.h (gfc_unit): Add recl_subrecord, bytes_left_subrecord
and continued.
* io/file_pos.c (unformatted_backspace): Change default of record
marker size to four bytes. Loop over subrecords.
* io/open.c: Default recl is max_offset. If
compile_options.max_subrecord_length has been set, set set
u->recl_subrecord to its value, to the maximum value otherwise.
* io/transfer.c (top level): Add prototypes for us_read, us_write,
next_record_r_unf and next_record_w_unf.
(read_block_direct): Separate codepaths for unformatted direct
and unformatted sequential. If a recl has been set by the
user, use the number of bytes left for the record if it is smaller
than the read request. Loop over subrecords. Set an error if the
user has set a recl and the read was short.
(write_buf): Separate codepaths for unformatted direct and
unformatted sequential. If a recl has been set by the
user, use the number of bytes left for the record if it is smaller
than the read request. Loop over subrecords. Set an error if the
user has set a recl and the read was short.
(us_read): Add parameter continued (to indicate that bytes_left
should not be intialized). Change default of record marker size
to four bytes. Use subrecord. If the subrecord length is smaller than
zero, this indicates a continuation.
(us_write): Add parameter continued (to indicate that the continued
flag should be set). Use subrecord.
(pre_position): Use 0 for continued on us_write and us_read calls.
(skip_record): New function.
(next_record_r_unf): New function.
(next_record_r): Use next_record_r_unf.
(write_us_marker): Default size for record markers is four bytes.
(next_record_w_unf): New function.
(next_record_w): Use next_record_w_unf.
From-SVN: r119412
2006-12-01 Richard Guenther <rguenther@suse.de>
PR c++/29433
* dwarf2out.c (struct pubname_struct): Make name const.
(add_pubtype): Do not xstrdup identifiers.
From-SVN: r119404
2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
PR c++/29066
* typeck.c (build_binary_op): Fix pointer to member function
comparison for ptrmemfunc_vbit_in_delta targets.
2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
PR c++/29066
* g++.dg/expr/pr29066.c: New.
From-SVN: r119403
2006-12-01 Joseph Myers <joseph@codesourcery.com>
David Edelsohn <edelsohn@gnu.org>
PR target/24036
* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Document new target macros.
* defaults.h (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Define.
* config/i386/i386.h (HARD_REGNO_NREGS_HAS_PADDING,
HARD_REGNO_NREGS_WITH_PADDING): Define.
* rtlanal.c (subreg_regno_offset, subreg_offset_representable_p):
Use new macros to detect modes with holes; do not look at integer
units.
(subreg_offset_representable_p): Check for and disallow cases
where the modes use different numbers of bits from registers.
* config/rs6000/rs6000.c (rs6000_emit_move): Handle TFmode
constant for soft-float.
(rs6000_hard_regno_nregs): Use UNITS_PER_FP_WORD for e500 GPRs
containing doubles.
(rs6000_split_multireg_move): Use DFmode reg_mode for TFmode moves
in E500 double case.
* config/rs6000/rs6000.md (movtf): Allow soft-float.
(movtf_softfloat): New.
Co-Authored-By: David Edelsohn <edelsohn@gnu.org>
From-SVN: r119395
2006-12-01 Dirk Mueller <dmueller@suse.de>
PR c++/18313
* decl.c (grokdeclarator): Warn for type qualifiers on return
type for non-dependent types.
* pt.c (tsubst_function_type): Warn for type qualifiers on
return type for dependent types.
* g++.dg/warn/Wreturn-type-4.C: New testcase.
From-SVN: r119382
* tree-ssa-live.c (create_coalesce_list): Create a hash table.
(COALESCE_HASH_FN): New. Define hash function.
(partition_pair_map_hash): New. Hash value for a partition pair.
(partition_pair_map_eq): New. Equality for hash pairs.
(create_coalesce_list): Create hash table.
(delete_coalesce_list): Free hash table.
(find_partition_pair): Find/create pairs in hash table.
(compare_pairs): Sort pairs in ascending order now.
(num_coalesce_pairs): New. Number of pairs in hash table.
(struct partition_pair_iterator): Iterator struct for pair table.
(first_partition_pair): Iterator function for first pair.
(end_partition_pair_p): Iterator function for end of iteration.
(next_partition_pair): Iterator function for next pair.
(FOR_EACH_PARTITION_PAIR): Macro for iterating over pairs.
(sort_coalesce_list): Sort pairs from hash table into an array.
(pop_best_coalesce): Take pairs from the array.
(dump_coalesce_list): Update to use hash table or sorted array.
* tree-ssa-live.h (struct partition_pair_d): Remove next field.
(struct coalesce_list_d): Add hash table related fields.
From-SVN: r119378
gcc/
2006-11-30 Carlos O'Donell <carlos@codesourcery.com>
* doc/tm.texi (MAX_OFILE_ALIGNMENT): Document default.
* config/elfos.h [!MAX_OFILE_ALIGNMENT] (MAX_OFILE_ALIGNMENT):
Default is the largest alignment supported for 32-bit ELF and
representable on a 32-bit host.
From-SVN: r119374
include:
2006-05-03 Andrew Stubbs <andrew.stubbs@st.com>
J"orn Rennecke <joern.rennecke@st.com>
PR driver/29931
* libiberty.h (make_relative_prefix_ignore_links): Declare.
libiberty:
2006-05-03 Andrew Stubbs <andrew.stubbs@st.com>
J"orn Rennecke <joern.rennecke@st.com>
PR driver/29931
* make-relative-prefix.c (make_relative_prefix_1): New function,
broken out of make_relative_prefix. Make link resolution dependent
on new parameter.
(make_relative_prefix): Use make_relative_prefix_1.
(make_relative_prefix_ignore_links): New function.
Co-Authored-By: J"orn Rennecke <joern.rennecke@st.com>
From-SVN: r119366
2006-11-30 Richard Guenther <rguenther@suse.de>
* tree-vectorizer.h (vectorizable_function): Export.
* tree-vect-transform.c (vectorizable_function): Likewise.
* tree-vect-patterns.c (vect_recog_pow_pattern): Set
type_in to scalar type in recognition of squaring.
Make sure the target can vectorize sqrt in recognition
of sqrt, set type_in to vector type in this case.
* gcc.dg/vect/vect-pow-1.c: Rename ...
* gcc.dg/vect/fast-math-vect-pow-1.c: ... to this. Use
floats instead of doubles, check successful vectorization.
From-SVN: r119362
* cgraphunit.c (cgraph_finalize_compilation_unit): Add a newline
at the end of a diagnostics message.
* alloc-pool.c (pool_free): Postpone clearing the pool entry
until after asserting that it was allocated in the right pool.
* cfgrtl.c (print_rtl_with_bb): Print predecessor and
successor edge information as well. Make output of live regs
on exit consistent with live regs on entry.
From-SVN: r119357