* alias.c (alias_sets): Change the type to
VEC(alias_set_entry,gc) *.
(get_alias_set_entry, new_alias_set, record_alias_subset): Use
VEC instead of VARRAY.
(last_alias_set): Remove.
From-SVN: r113005
* alias.c (reg_base_value, old_reg_base_value): Change the
type to VEC(rtx,gc) *.
(REG_BASE_VALUE, find_base_value, record_set,
init_alias_analysis): Use VEC instead of VARRAY.
From-SVN: r113004
PR target/26961
* fold-const.c (fold_ternary): When converting "A ? B : C" into either
"A op B" or "A op C", we may need to convert A to the type of B and C.
* gcc.dg/fold-cond-1.c: New test case.
* gcc.dg/pr26961-1.c: Likewise.
From-SVN: r113001
2006-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/27138
* io/list_read.c (eat_line): New function.
(parse_repeat): Use new function and free_saved.
(read_logical): Same.
(read_integer): Use new function.
(parse_real): Use nml_bad_return and new function.
(read_complex): Use new function and free_saved.
(read_real): Same.
From-SVN: r112999
* target.h (struct gcc_target): Add mode_rep_extended.
* rtlanal.c (num_sign_bit_copies_in_rep): New global.
(init_num_sign_bit_copies_in_rep): Initialize it using
mode_rep_extended.
(truncate_to_mode): Use it.
(init_rtlanal): Call init_num_sign_bit_copies_in_rep.
* targhooks.h (default_mode_rep_extended): Declare it.
* targhooks.c (default_mode_rep_extended): Define it.
* target-def.h (TARGET_MODE_REP_EXTENDED): New macro. Default to
default_mode_rep_extended.
(TARGET_INITIALIZER): Include it.
* doc/tm.texi (Misc): Document it.
* config/mips/mips.c (TARGET_TRUNCATED_TO_MODE): Override it.
(mips_truncated_to_mode): New function.
From-SVN: r112998
PR middle-end/25474
* expr.c (compress_float_constant): Copy the narrow constant into
a new pseudo before extending it to its final width.
From-SVN: r112991
2006-04-16 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/26017
* trans-array.c(gfc_array_init_size): Introduce or_expr
which is true if the size along any dimension
is negative. Create a temporary variable with base
name size. If or_expr is true, set the temporary to 0,
to the normal size otherwise.
2006-04-16 Thomas Koenig <Thomas.Koenig@online.de>
* gfortran.dg/allocate_zerosize_1.f90: New test.
From-SVN: r112988
2006-04-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26822
* intrinsic.c (add_functions): Mark LOGICAL as elemental.
PR fortran/26787
* expr.c (gfc_check_assign): Extend scope of error to include
assignments to a procedure in the main program or, from a
module or internal procedure that is not that represented by
the lhs symbol. Use VARIABLE rather than l-value in message.
PR fortran/27096
* trans-array.c (gfc_trans_deferred_array): If the backend_decl
is not a descriptor, dereference and then test and use the type.
PR fortran/25597
* trans-decl.c (gfc_trans_deferred_vars): Check if an array
result, is also automatic character length. If so, process
the character length.
PR fortran/18803
PR fortran/25669
PR fortran/26834
* trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
data.info.dimen for bound intrinsics.
* trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
UBOUND intrinsics and supply their shape information to the ss
and the loop.
PR fortran/27124
* trans_expr.c (gfc_trans_function_call): Add a new block, post,
in to which all the argument post blocks are put. Add this block
to se->pre after a byref call or to se->post, otherwise.
2006-04-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26787
* gfortran.dg/proc_assign_1.f90: New test.
* gfortran.dg/procedure_lvalue.f90: Change message.
* gfortran.dg/namelist_4.f90: Add new error.
PR fortran/27096
* gfortran.dg/auto_pointer_array_result_1.f90
PR fortran/27089
* gfortran.dg/specification_type_resolution_1.f90
PR fortran/18803
PR fortran/25669
PR fortran/26834
* gfortran.dg/bounds_temporaries_1.f90: New test.
PR fortran/27124
* gfortran.dg/array_return_value_1.f90: New test.
From-SVN: r112981
* pa.md (output_bb patterns): Shorten long branch alternatives by 4.
(output_bvb patterns): Likewise.
* pa.c (output_bb): Use 'bb' insn for long branch case.
(output_bvb): Likewise use '{bvb|bb}' for long branch case.
(output_dbra): Use '{comb|cmpb}' for long branch case for alternative
1. Correct length operand for alternatives 1 and 2.
(output_movb): Use '{comb|cmpb}' for long branch case for alternatives
1, 2 and 3. Correct length operand for alternatives 1, 2 and 3.
From-SVN: r112970
* Make-lang.in (cp/pt.o): Depend on vecprim.h.
* pt.c: Include vecprim.h.
(inline_parm_levels): Change the type to VEC(int,heap) *.
(inline_parm_levels_used): Remove.
(maybe_begin_member_template_processing,
maybe_end_member_template_processing): Use VEC instead of
VARRAY.
From-SVN: r112969
* trans-io.c (set_string): Use fold_build2 and build_int_cst instead
of build2 and convert to construct "x < 0" rather than "x <= -1".
From-SVN: r112968
* tree-cfg.c (make_edges, make_omp_sections_edges, move_stmt_r,
is_ctrl_altering_stmt): Reinstate RTH's changes from r112935 that
were accidentally reverted by r112959.
From-SVN: r112966
PR middle-end/26823
* except.h (eh_region_outermost): New prototype.
* except.c (eh_region_outermost): New function.
* tree-cfg.c (find_outermost_region_in_block): Use it.
* g++.dg/gomp/pr26823-1.C: New test.
* g++.dg/gomp/pr26823-2.C: New test.
From-SVN: r112959
2006-04-14 Douglas Gregor <dgregor@cs.indiana.edu>
PR libstdc++/27162
* include/bits/stl_algo.h (__search_n(,,,, _BinaryPredicate,
std::forward_iterator_tag)): Use __binary_pred, not ==.
From-SVN: r112957
* local-alloc.c (rest_of_handle_local_alloc): Use VEC instead
of VARRAY.
* reload1.c (reg_equiv_memory_loc_varray): Rename to
reg_equiv_memory_loc_vec. Change the type to VEC(rtx,gc) *.
(init_reload, reload): Use VEC instead of VARRAY.
* reload.h: Update the prototype for
reg_equiv_memory_loc_varray.
From-SVN: r112955
* config/sparc/sparc.c (emit_and_preserve): Allocate space for the
register save area.
Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>
From-SVN: r112950
PR middle-end/27095
* builtins.c: (expand_builtin_memset): Stabilize args before expansion
and emit libcall here in case the builtin fails.
(expand_builtin_strcmp): Always emit the libcall here on failure.
From-SVN: r112948
* params.def (PARAM_MAX_SCHED_READY_INSNS): New parameter,
defaulting to 100.
* params.h (MAX_SCHED_READY_INSNS): New macro.
* haifa-sched.c: (queue_to_ready): Re-queue insns for the next cycle
past MAX_SCHED_READY_INSNS during the first scheduling pass.
(schedule_block): Delay insns past MAX_SCHED_READY_INSNS in
the ready list for 1 cycle during the first scheduling pass.
* doc/invoke.texi (--param): New parameter max-sched-ready-insns.
From-SVN: r112936
* lib/target-supports.exp (check_effective_target_int32plus): New.
(check_effective_target_ptr32plus): New.
(check_effective_target_size32plus): New.
(check_effective_target_int16): New.
(check_profiling_available): Add m32c to the list of unsupported targets.
* gcc.c-torture/compile/20000804-1.c: Skip m32c also.
* gcc.c-torture/compile/20001226-1.c: Skip m32c due to small
memory size.
* gcc.c-torture/compile/20010327-1.c: Skip m32c due to non-SI
pointers.
* gcc.c-torture/compile/20020604-1.c: Skip m32c due to small
size_t.
* gcc.c-torture/compile/20050303-1.c: Require >=32 bit integers
and size_t.
* gcc.c-torture/compile/980506-1.c: Require >=32 bit size_t.
* gcc.c-torture/execute/20020404-1.x: Check for any 16 bit target,
not just xstormy16. Skip m32c due to weird pointer size.
* gcc.c-torture/execute/20021024-1.x: Check for any 16 bit target,
not just xstormy16.
* gcc.c-torture/execute/shiftdi.x: Check for any 16 bit target,
not just xstormy16.
* gcc.dg/20020312-2.c: Add m32c support.
* gcc.dg/20040622-2.c: Require >=32 bit pointers.
* gcc.dg/20050321-1.c: XFail m32c due to incorrect malloc prototype
in test.
* gcc.dg/20050321-2.c: Require >=32 bit integers.
* gcc.dg/asm-1.c: Skip if int and short are the same size.
* gcc.dg/fold-mod-1.c: Require >=32 bit integers.
* gcc.dg/fold-overflow-1.c: Skip m32c due to small const types in asm.
* gcc.dg/format/bitfld-1.c: Require >=32 bit integers due to printf formats
* gcc.dg/init-string-2.c: Require >=32 bit integers.
* gcc.dg/max-1.c: Skip m32c in r8c or m16c mode due to small pointers.
* gcc.dg/noncompile/920923-1.c: Skip small-int message for int16 hosts.
* gcc.dg/pch/struct-1.c: Require >= 32 bit integers.
* gcc.dg/pr14796-2.c: Require >=32 bit integers.
* gcc.dg/pr17112-1.c: Require >=32 bit integers.
* gcc.dg/pr18241-1.c: XFail m32c due to incorrect memset prototype
in test.
* gcc.dg/pr18241-2.c: XFail m32c due to incorrect memset prototype
in test.
* gcc.dg/pr19340.c: Skip m32c due to lack of scheduling.
* gcc.dg/pr23049.c: Require >=32 bit integers.
* gcc.dg/torture/pr26565.c: Skip m32c as everything is already packed.
* gcc.dg/torture/pr26587.c: Require >=32 bit integers.
* gcc.dg/torture/pr26630.c: Require >=32 bit integers.
* gcc.dg/tree-ssa/loop-10.c: Require >=32 bit integers.
* gcc.dg/tree-ssa/loop-2.c: Require >=32 bit size_t.
* gcc.dg/tree-ssa/loop-4.c: Require >=32 bit size_t.
* gcc.dg/tree-ssa/ltrans-1.c: Require >=32 bit size_t.
* gcc.dg/tree-ssa/ltrans-2.c: Require >=32 bit size_t.
* gcc.dg/tree-ssa/ltrans-3.c: Require >=32 bit size_t.
* gcc.dg/tree-ssa/ltrans-4.c: Require >=32 bit size_t.
* gcc.dg/tree-ssa/pr14341.c: Require >=32 bit integers.
* gcc.dg/tree-ssa/pr23382.c: XFail m32c due to incorrect malloc
prototype in test.
* gcc.dg/tree-ssa/pr24627.c: Require >=32 bit integers.
* gcc.dg/tree-ssa/pr26180.c: Require >=32 bit integers.
* gcc.dg/tree-ssa/vrp14.c: Require >=32 bit integers.
* gcc.dg/tree-ssa/vrp21.c: Require >=32 bit integers.
* gcc.dg/tree-ssa/vrp22.c: Require >=32 bit integers.
* gcc.c-torture/execute/20040629-1.x: New. Require >16 bit integers.
* gcc.c-torture/execute/20040703-1.x: Likewise.
* gcc.c-torture/execute/20040705-1.x: Likewise.
* gcc.c-torture/execute/20040705-2.x: Likewise.
* gcc.c-torture/execute/20040709-1.x: Likewise.
* gcc.c-torture/execute/20040709-2.x: Likewise.
* gcc.c-torture/execute/20040811-1.x: Likewise.
* gcc.c-torture/execute/20050316-1.x: Likewise.
* gcc.c-torture/execute/bitfld-4.x: Likewise.
* gcc.c-torture/execute/pr19689.x: Likewise.
* gcc.c-torture/execute/pr7284-1.x: Likewise.
* gcc.c-torture/execute/usmul.x: Likewise.
* gcc.c-torture/execute/vrp-5.x: Likewise.
* gcc.c-torture/execute/vrp-6.x: Likewise.
* gcc.dg/debug/20041023-1.s: Likewise.
From-SVN: r112934
* fold-const.c (native_encode_expr): New function to encode
the target representation of an INTEGER_CST, REAL_CST, COMPLEX_CST
or VECTOR_CST into a specified buffer.
(native_encode_int): New function.
(native_encode_real): New function.
(native_encode_complex): New function.
(native_encode_vector): New function.
(native_interpret_expr): Inverse of native_encode_expr to convert
a target representation into an INTEGER_CST, REAL_CST etc...
(native_interpret_int): New function.
(native_interpret_real): New function.
(native_interpret_complex): New function.
(native_interpret_vector): New function.
(fold_view_convert_expr): New function to constant fold/evaluate
a VIEW_CONVERT_EXPR of a suitable constant expression.
(fold_unary) <VIEW_CONVERT_EXPR>: Call fold_view_convert_expr.
Change call of build1 to fold_build1 when constructing a
VIEW_CONVERT_EXPR.
* gcc.target/i386/20050113-1.c: Tweak testcase to reflect that casts
of integers to a vector types are now constant expressions in C.
* gcc.dg/vect/vect-fold-1.c: New test case.
From-SVN: r112927
2006-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/26766
* io/io.h: Add bit to identify associated unit as internal.
* io/unit.c (get_external_unit): Renamed the find_unit_1 function to
reflect the external unit functionality vs internal unit.
(get_internal_unit): New function to allocate and initialize an internal
unit structure.
(get_unit): Use get_internal_unit and get_external_unit.
(is_internal_unit): Revised to use new bit added in io.h.
* io/transfer.c (data_transfer_init): Fix line width.
(st_read_done): Free memory allocated for internal unit.
(st_write_done): Add test to only flush and truncate when not an
internal unit. Free memory allocated for internal unit.
From-SVN: r112914