2010-08-19 Daniel Kraft <d@domob.eu>
PR fortran/29785
PR fortran/45016
* trans.h (struct gfc_se): New flag `byref_noassign'.
* trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
(gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
* expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
and check for compile-time errors with those.
* trans-decl.c (trans_associate_var): Use new routine
`gfc_conv_shift_descriptor_lbound' instead of doing it manually.
* trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
(gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
(gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
(gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
* trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
rank remapping for assignment.
2010-08-19 Daniel Kraft <d@domob.eu>
PR fortran/29785
PR fortran/45016
* gfortran.dg/pointer_assign_5.f90: Remove 'not implemented' error.
* gfortran.dg/pointer_remapping_1.f90: New test.
* gfortran.dg/pointer_remapping_2.f03: New test.
* gfortran.dg/pointer_remapping_3.f08: New test.
* gfortran.dg/pointer_remapping_4.f03: New test.
* gfortran.dg/pointer_remapping_5.f08: New test.
* gfortran.dg/pointer_remapping_6.f08: New test.
From-SVN: r163377
2010-08-19 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*lea_1): Use P mode iterator.
(lea add splitter): Also handle DImode operands.
(DImode lea add splitter): Use x86_64_immediate_operand for operand 2
predicate. Do not use ix86_lea_for_add_ok.
(zext DImode lea add splitter): Use ix86_lea_for_add_ok.
(lea ashift splitter): Also handle DImode operands.
(DImode lea ashift splitter): Remove splitter.
2010-08-19 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*add<SWI:mode>3_cconly_overflow): Do not use
ix86_binary_operator_ok.
From-SVN: r163375
2010-08-19 Ian Bolton <ian.bolton@arm.com>
PR target/45070
* gcc.c-torture/execute/pr45070.c: New.
* config/arm/arm.c (arm_output_epilogue): Ensure that return
value of size 1-3 is handled correctly.
From-SVN: r163367
* tree-switch-conversion.c (gen_inbound_check): Ensure that the
type for the conditional has wide enough range.
* testsuite/g++.dg/pr44328.C: New test.
From-SVN: r163366
2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/41859
* resolve.c (resolve_transfer): Traverse operands and set expression
to be checked to a non EXPR_OP type.
From-SVN: r163363
* config/i386/i386.md (*add<mode>_1) <TYPE_LEA>: Split insn to lea.
<default>: Swap operands 1 and 2 for alternative 2 to use existing
code to output insn mnemonic. Fix comment.
(*addsi_1_zext): Add r-r-0 alternative 1.
<TYPE_LEA>: Split insn to lea.
<default>: Handle alternative 1.
(*addhi_1_lea): Add r-r-0 alternative 2. Use cond RTX instead of
multi-level if_then_else RTX to set "type" attribute.
<default>: Handle alternative 2.
(*addqi_1_lea): Add q-q-0 alternative 2 and r-r-0 alternative 4.
Use cond RTX instead of multi-level if_then_else RTX to set
"type" attribute.
<default>: Handle alternatives 2 and 4.
(lea splitters): Update calls to ix86_lea_for_add_ok.
* config/i386/i386.c (ix86_lea_for_add_ok): Remove unused "code"
argument.
* config/i386/i386-protos.h (ix86_lea_for_add_ok): Update prototype.
From-SVN: r163351
* gcc.dg/builtin-apply2.c (STACK_ARGUMENTS_SIZE): Define to
20 if __ARM_PCS is defined otherwise 64.
(bar): Use STACK_ARGUMENTS_SIZE for the third argument
instead of hard coded 64.
From-SVN: r163341
PR debug/42487
* lib/target-supports.exp
(check_effective_target_function_sections): New.
* gcc.dg/debug/dwarf2/aranges-fnsec-1.c: Check that the target supports
function sections before proceding.
From-SVN: r163326
* tree.h (host_integerp): Add ATTRIBUTE_PURE when not
ENABLE_TREE_CHECKING.
(tree_low_cst): Add inline version for !ENABLE_TREE_CHECKING
and GCC >= 4.3.
From-SVN: r163313
PR fortran/45308
* intrinsics/date_and_time.c (date_and_time): Pass __{zone,time,date}_len
instead of {ZONE,TIME,DATE}_LEN as second argument to fstrcpy. Drop
asserts. Adjust comment to the F2003 wording from the F95 wording.
* gfortran.dg/pr45308.f03: New test.
From-SVN: r163312
PR fortran/45304
* trans-decl.c (build_library_function_decl_1): Chain on
void_list_node instead of creating a new TREE_LIST.
* trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
* trans-types.c (gfc_get_function_type): Likewise. Set
typelist to void_list_node for the main program.
From-SVN: r163311
2010-08-17 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_lea_for_add_ok): For !TARGET_OPT_AGU
or optimizing for size, always avoid lea if possible.
* config/i386/i386.md (*add<mode>_1): Always avoid lea if
possible.
From-SVN: r163310
gcc:
* unwind-dw2-fde-darwin.c (_darwin10_Unwind_FindEnclosingFunction):
Dunmmy function with NULL return unless the target is
OSX >= 10.6 (Darwin10).
libjava:
* include/posix.h: Make substitution of
_darwin10_Unwind_FindEnclosingFunction conditional on
OSX >= 10.6 (Darwin10).
From-SVN: r163309
2010-08-17 Richard Guenther <rguenther@suse.de>
* tree-ssa-dom.c (struct edge_info): Use a VEC for the
list of conditional equivalences.
(free_all_edge_infos): Adjust.
(record_equivalences_from_incoming_edge): Likewise.
(record_cond): Likewise.
(build_and_record_new_cond): Likewise.
(record_conditions): Likewise.
(dom_opt_leave_block): Likewise.
From-SVN: r163302
2010-08-17 Kai Tietz <kai.tietz@onevision.com>
* class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
or if -fms-extensions is enabled check, check permissive.
From-SVN: r163300
/gcc
2010-08-17 Shujing Zhao <pearly.zhao@oracle.com>
PR c/40563
* c-decl.c (diagnose_uninitialized_cst_member): New function.
(finish_decl): Use it to issue a -Wc++-compat warning about
uninitialized const field in struct or union.
(finish_struct): Use strip_array_types.
/gcc/testsuite
2010-08-17 Shujing Zhao <pearly.zhao@oracle.com>
PR c/40563
* gcc.dg/Wcxx-compat-20.c: New test.
From-SVN: r163296
2010-08-17 Daniel Kraft <d@domob.eu>
PR fortran/38936
* gfortran.h (struct gfc_association_list): New member `where'.
(gfc_is_associate_pointer) New method.
* match.c (gfc_match_associate): Remember locus for each associate
name matched and do not try to set variable flag.
* parse.c (parse_associate): Use remembered locus for symbols.
* primary.c (match_variable): Instead of variable-flag check for
associate names set it for all such names used.
* symbol.c (gfc_is_associate_pointer): New method.
* resolve.c (resolve_block_construct): Don't generate assignments
to give associate-names their values.
(resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
(resolve_symbol): Set some more attributes for associate variables,
set variable flag here and check it and don't try to build an
explicitely shaped array-spec for array associate variables.
* trans-expr.c (gfc_conv_variable): Dereference in case of association
to scalar variable.
* trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
(gfc_sym_type): Return pointer type for association to scalar vars.
* trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
(trans_associate_var): New method.
(gfc_trans_deferred_vars): Handle association symbols.
2010-08-17 Daniel Kraft <d@domob.eu>
PR fortran/38936
* gfortran.dg/associate_1.f03: Extended to test newly supported
features like association to variables.
* gfortran.dg/associate_3.f03: Removed check for illegal change
of associate-name here...
* gfortran.dg/associate_5.f03: ...and added it here.
* gfortran.dg/associate_6.f03: No longer XFAIL'ed.
* gfortran.dg/associate_7.f03: New test.
From-SVN: r163295