2008-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/35617
* io/list_read.c (eat_separator): If next character after eatline is '!'
then eatline again.
From-SVN: r133302
2008-03-17 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19637
* fold-const.c (fold_unary): Remove restrictions of removing
intermediate pointer-conversions (P2)(P1)P0.
* tree-ssa-ccp.c (maybe_fold_stmt_addition): Recover from
conversion to void pointer.
(get_maxval_strlen): Handle addresses of the form &(*p)[0].
* g++.dg/tree-ssa/pr19637.C: New testcase.
From-SVN: r133291
2008-03-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35470
* resolve.c (check_assumed_size_reference): Only visit the
first reference and look directly at the highest dimension.
2008-03-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35470
* gfortran.dg/subref_array_pointer_3.f90 : New test.
From-SVN: r133279
2008-03-16 Richard Guenther <rguenther@suse.de>
PR middle-end/35607
* tree-ssa-loop-niter.c (expand_simple_operations): Do not
expand TREE_INVARIANT operations that are not gimple invariant.
* gcc.c-torture/compile/pr35607.c: New testcase.
* gcc.dg/tree-ssa/loop-19.c: Use -O2 to avoid vectorization.
From-SVN: r133273
* doc/extend.texi (Alignment): Say that the ABI controls
the __alignof__ for non-strict-alignment targets rather
than being a recommendation.
From-SVN: r133271
libjava/
2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (write_entries_to_file_split): New variable.
(write_entries_to_file): Write out that many entries at once,
for speed.
* Makefile.in: Regenerate.
From-SVN: r133268
2008-03-15 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (arm_unwind_emit): Suppress unused unwinding
annotations.
(arm_output_fn_unwind): Mark functions that can not be unwound.
From-SVN: r133266
2008-03-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (ccp_fold): Also read from constant values
and fold constant aggregate refs.
(fold_const_aggregate_ref): Handle string constants
and constructors in ARRAY_REFs. Handle INDIRECT_REF.
(evaluate_stmt): Simplify now that ccp_fold folds constant
aggregate refs.
* gcc.dg/tree-ssa/ssa-ccp-16.c: New testcase.
From-SVN: r133257
2008-03-15 Paul Brook <paul@codesourcery.com>
* config/arm/arm.md (insv): Use gen_insv_t2 and gen_insv_zero.
(extzv): Use gen_extzv_t2.
(insv_t2, insv_zero, extv, extzv_t2): New patterns.
From-SVN: r133254
2008-03-15 Richard Guenther <rguenther@suse.de>
* tree-ssa-ccp.c (get_symbol_constant_value): Export.
(fold_const_aggregate_ref): Likewise.
(get_value): Return NULL if we don't have any values.
(ccp_finalize): Set const_val to NULL after freeing it.
* tree-flow.h (get_symbol_constant_value): Declare.
(fold_const_aggregate_ref): Likewise.
* tree-ssa-sccvn.c (try_to_simplify): Use them.
* gcc.dg/pr23911.c: Adjust testcase.
* gcc.dg/tree-ssa/pr14841.c: Likewise.
* gcc.dg/tree-ssa/20030922-2.c: Likewise.
From-SVN: r133251
2008-03-15 Richard Guenther <rguenther@suse.de>
PR middle-end/35593
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Make sure
to not produce negative array indices if not allowed. Add
parameter to indicate that.
(maybe_fold_offset_to_component_ref): Allow negative array
indices only for the first member of a structure.
(maybe_fold_offset_to_reference): Allow negative array indices.
(maybe_fold_stmt_addition): Likewise.
* g++.dg/warn/Warray-bounds-3.C: New testcase.
From-SVN: r133249
* gcc/gcc/config/avr/avr.c (avr_arch_types): Add avr6 entry.
(avr_arch): Add ARCH_AVR6.
(avr_mcu_types): Add 'atmega2560' and 'atmega2561' entry.
(initial_elimination_offset): Initialize and use 'avr_pc_size'
instead of fixed value 2.
(print_operand_address): Use gs() asm specifier instead of pm().
(avr_assemble_integer): (Ditto.).
(avr_output_addr_vec_elt): (Ditto.).
(print_operand): Handle "!" code.
* gcc/gcc/config/avr/avr.h (TARGET_CPU_CPP_BUILTINS): Add
__AVR_3_BYTE_PC__, __AVR_2_BYTE_PC__ and __AVR_HAVE_JMP_CALL__.
(AVR_HAVE_EIJMP_EICALL): Define.
(AVR_3_BYTE_PC): Redefine.
(AVR_2_BYTE_PC): (Ditto.).
(PRINT_OPERAND_PUNCT_VALID_P): Add '!' code.
(LINK_SPEC): Add atmega2560 and atmega2561.
(CRT_BINUTILS_SPEC): Add atmega2560 (crtm2560.o) and atmega2561
(crtm2561.o).
* gcc/gcc/config/avr/avr.md (call_insn): Use eicall instead of icall
for 3 byte PC devices.
(call_value_insn): (Ditto.).
(*tablejump_enh): Use eijmp instead of ijmp for 3 byte PC devices.
(indirect_jump): Use only for for 2 byte PC devices.
(*tablejump): (Ditto.).
(*indirect_jump_avr6): Add insn.
(*tablejump_rjmp): Don't use for 3 byte PC devices.
* gcc/gcc/config/avr/libgcc.S (__prologue_saves__): Use eijmp
instead of ijmp for 3 byte PC devices.
(__tablejump2__): (Ditto.).
* gcc/gcc/config/avr/t-avr (MULITLIB_OPTIONS): Add avr6 architecture.
(MULITLIB_DIRNAMES): (Ditto.).
(MULTILIB_MATCHES): Add atmega2560 and atmega2561 to list.
Co-Authored-By: Anatoly Sokolov <aesok@post.ru>
From-SVN: r133248
* config/i386/mmx.md ("sse2_umulv1siv2di3"): Rename from
"sse2_umulsidi3". Use V1DI mode for operand 0.
("mmx_psadbw"): Use V1DI mode for operand 0.
* config/i386/i386-modes.def (V1SI): New vector mode.
* config/i386/i386.c (struct builtin_description)
[IX86_BUILTIN_PMULUDQ]: Use CODE_FOR_sse2_umulv1siv1di3.
(v1di_ftype_v8qi_v8qi): Rename from di_ftype_v8qi_v8qi.
(v1di_ftype_v2si_v2si): Rename from di_ftype_v2si_v2si.
(ix86_init_mmx_sse_builtins) [__builtin_ia32_psadbw]: Use
v1di_ftype_v8qi_v8qi type.
[__builtin_ia32_pmuludq]: Use v1di_ftype_v2si_v2si type.
From-SVN: r133243
* gnat_rm.texi (Implementation Defined Characteristics)
(Wide_Text_IO, Wide_Wide_Text_IO): Add @var annotations where
appropriate.
* gnat_ugn.texi (Wide Character Encodings, Switches for gnatbind)
(Switches for gnatchop, Installing a library): Likewise.
From-SVN: r133242
2008-03-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34172
* tree-flow.h (refs_may_alias_p): Declare.
(get_single_def_stmt): Likewise.
(get_single_def_stmt_from_phi): Likewise.
(get_single_def_stmt_with_phi): Likewise.
* tree-dfa.c (refs_may_alias_p): New function.
(get_single_def_stmt): Likewise.
(get_single_def_stmt_from_phi): Likewise.
(get_single_def_stmt_with_phi): Likewise.
* tree-ssa-sccvn.c (get_def_ref_stmt_vuses): New function.
(vn_reference_lookup_1): New helper function.
(vn_reference_lookup): Walk the virtual use-def chain to
continue searching for a match if the def does not alias the
reference we are looking for.
* gcc.dg/tree-ssa/ssa-fre-11.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-12.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-13.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-14.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-15.c: Likewise.
* gcc.dg/tree-ssa/20031106-4.c: Remove XFAIL.
From-SVN: r133222
2008-03-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34043
PR tree-optimization/33989
* tree-ssa-pre.c (execute_pre): Allow SCCVN to do insertion
when doing FRE.
(bitmap_find_leader): Use extra argument to verify dominance
relationship inside a basic-block.
(can_PRE_operation): Add VIEW_CONVERT_EXPR.
(find_leader_in_sets): Adjust.
(create_component_ref_by_pieces): Take extra argument for
dominance check, handle lookup failures.
(find_or_generate_expression): Likewise.
(create_expression_by_pieces): Likewise.
(insert_into_preds_of_block): Adjust.
(create_value_expr_from): If asked for, verify all operands
are in the blocks AVAIL_OUT set.
(make_values_for_stmt): Check for SSA_NAMEs that are life
over an abnormal edge.
(compute_avail): Remove such check.
(do_SCCVN_insertion): New function.
(eliminate): If we do not find a leader suitable for replacement
insert a replacement expression from SCCVN if available.
* tree-ssa-sccvn.h (run_scc_vn): Update prototype.
(struct vn_ssa_aux): Add needs_insertion flag.
* tree-ssa-sccvn.c (may_insert): New global flag.
(copy_reference_ops_from_ref): Value-number union member access
based on its size, not type and member if insertion is allowed.
(visit_reference_op_load): For a weak match from union type
punning lookup a view-converted value and insert a SSA_NAME
for that value if that is not found.
(visit_use): Make dumps shorter. Do not disallow value numbering
SSA_NAMEs that are life over an abnormal edge to constants.
(free_scc_vn): Release inserted SSA_NAMEs.
(run_scc_vn): New flag to specify whether insertion is allowed.
Process SSA_NAMEs in forward order.
* tree-ssa-loop-im.c (for_each_index): Handle invariant
ADDR_EXPRs inside VIEW_CONVERT_EXPR.
* fold-const.c (fold_unary): Fold VIEW_CONVERT_EXPRs from/to
pointer type to/from integral types that do not change the
precision to regular conversions.
* gcc.dg/tree-ssa/ssa-fre-7.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-8.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-10.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-17.c: Likewise.
From-SVN: r133218
PR testsuite/35406
* gcc.dg/tree-ssa/ldist-4.c: Update expected scan match
count from 0 to 1 for lp64 targets.
* gfortran.dg/ldist-1.f90: Update test to check
for 5 loops distributed instead of 4 for lp64 targets.
Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>
From-SVN: r133216