tree-chrec.c (chrec_fold_plus_1): Ensure we build binary operations with the correct types.
2005-06-02 Richard Guenther <rguenth@gcc.gnu.org>
* tree-chrec.c (chrec_fold_plus_1): Ensure we build
binary operations with the correct types.
* tree-ssa-loo-ivopts.c (idx_find_step): Use sizetype
for all computation.
* config/rs6000/rs6000.md (sync_boolcshort_internal): New.
* config/rs6000/rs6000.c (rs6000_emit_sync): Shift count must
be complemented for big-endian. Mask for AND must be rotated,
not shifted. Handle short operands with NOT on the memory
operation.
Kazu Hirata [Thu, 2 Jun 2005 20:21:54 +0000 (20:21 +0000)]
gimplify.c (gimplify_ctx): Change the type of case_labels to VEC from VARRAY.
* gimplify.c (gimplify_ctx): Change the type of case_labels to
VEC from VARRAY.
(gimplify_switch_expr, gimplify_case_label_expr): Adjust uses
of case_labels.
* config/mips/mips.h (processor_type): Remove PROCESSOR_DEFAULT,
add PROCESSOR_MAX.
(mips_rtx_cost_data): New datatype.
(MEMORY_MOVE_COST): Use data from structure.
(BRANCH_COST): Ditto.
(LOGICAL_OP_NON_SHORT_CIRCUIT): Define to zero.
* config/mips/mips.md (cpu): Rework for processor_type changes.
* config/mips/mips.c (mips_cost): New variable.
(DEFAULT_COSTS): Define.
(mips_rtx_cost_data): New.
(mips_rtx_costs): Use. Minor formatting changes. Use COSTS_N_INSNS
for NEG cost. Add support for FLOAT, UNSIGNED_FLOAT, FIX,
FLOAT_EXTEND, FLOAT_TRUNCATE, and SQRT.
(override_options): Set cost data.
(mips_register_move_cost): Formatting changes.
(bdesc_arrays): Use PROCESSOR_MAX.
(mips_init_builtins): Ditto.
Nathan Sidwell [Thu, 2 Jun 2005 17:52:28 +0000 (17:52 +0000)]
re PR c++/21280 (#pragma interface, templates, and "inline function used but never defined")
cp:
PR c++/21280
* Make-lang.in (method.o): Add diagnostic.h
* decl.c (start_preparsed_function): Use decl's location for file
info.
* decl2.c (cp_finish_file): Set input_location before synthesizing
a function.
(mark_used): When deferring a synthesized function, save current
location. Do not set function's location when actually
synthesizing it.
* method.c: #include diagnostic.h.
(synthesize_method): Set the functions source location. Show
needed location if errors are emitted.
testsuite:
PR c++/21280
* g++.dg/opt/interface2.h: New.
* g++.dg/opt/interface2.C: New.
* g++.dg/init/ctor4.C: Adjust error lines.
* g++.old-deja/g++.bob/inherit2.C: Likewise.
* g++.old-deja/g++.bugs/900205_04.C: Likewise.
* g++.old-deja/g++.jason/opeq3.C: Likewise.
* g++.old-deja/g++.pt/assign1.C: Likewise.
* g++.old-deja/g++.pt/crash20.C: Likewise.
Dorit Nuzman [Thu, 2 Jun 2005 14:52:18 +0000 (14:52 +0000)]
re PR tree-optimization/21734 (ICE: -ftree-vectorize, segfault)
PR tree-optimization/21734
* tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop): Use the
phi_result when current_def is not available.
(slpeel_update_phi_nodes_for_guard1): Don't fail if current_def is not
available.
Steven Bosscher [Thu, 2 Jun 2005 10:19:12 +0000 (10:19 +0000)]
> 2005-06-02 Steven Bosscher <stevenb@suse.de> > Mostafa Hagog...
> 2005-06-02 Steven Bosscher <stevenb@suse.de>
> Mostafa Hagog <mustafa@il.ibm.com>
>
> * cfgloop.h (doloop_condition_get): Make external.
> * loop-doloop.c (doloop_condition_get): Generalize to make it
> usable in modulo-sched.c.
> * modulo-sched.c (doloop_register_get): Use
> doloop_condition_get instead of duplicating it.
Nathan Sidwell [Thu, 2 Jun 2005 08:53:48 +0000 (08:53 +0000)]
re PR c++/21151 (ICE when compiling c++ PCH of class definition within template function.)
cp:
PR c++/21151
* name-lookup.c (pushtag): Push local class even in a template.
testsuite:
PR c++/21151
* g++.dg/pch/local-1.C: New.
* g++.dg/pch/local-1.Hs: New.
Diego Novillo [Thu, 2 Jun 2005 02:57:15 +0000 (22:57 -0400)]
[multiple changes]
2005-06-01 Diego Novillo <dnovillo@redhat.com>
PR 14341, PR 21332, PR 20701, PR 21029, PR 21086, PR 21090
PR 21289, PR 21348, PR 21367, PR 21368, PR 21458.
* fold-const.c (invert_tree_comparison): Make extern.
* tree-flow.h (enum value_range_type): Move to tree-ssa-propagate.
(struct value_range_def): Limewise.
(get_value_range): Remove.
(dump_value_range): Remove.
(dump_all_value_ranges): Remove.
(debug_all_value_ranges): Remove.
(vrp_evaluate_conditional): Declare.
* tree-ssa-propagate.c (struct prop_stats_d): Add field
num_pred_folded.
(substitute_and_fold): Add argument use_ranges_p.
Update all callers.
If use_ranges_p is true, call fold_predicate_in to fold
predicates using range information.
Ignore ASSERT_EXPRs.
Change debugging output to only show statements that have been
folded.
(replace_phi_args_in): Move debugging output code from
substitute and fold.
(fold_predicate_in): New local function.
* tree-ssa-propagate.h (enum value_range_type): Move from
tree-flow.h.
(struct value_range_d): Likewise.
Add field 'equiv'.
(value_range_t): Rename from value_range.
* tree-vrp.c (found_in_subgraph): Rename from found.
(get_opposite_operand): Remove.
(struct assert_locus_d): Declare.
(assert_locus_t): Declare.
(need_assert_for): Declare.
(asserts_for): Declare.
(blocks_visited): Declare.
(vr_value): Declare.
(set_value_range): Add argument 'equiv'.
Don't drop to VARYING ranges that cover all values in the
type.
Make deep copy of equivalence set 'equiv'.
(copy_value_range): New local function.
(set_value_range_to_undefined): New local function.
(compare_values): Return -2 if either value has overflowed.
(range_includes_zero_p): New local function.
(extract_range_from_assert): Flip the predicate code if the
name being asserted is on the RHS of the predicate.
Avoid creating unnecessary symbolic ranges if the comparison
includes another name with a known numeric range.
Update the equivalnce set of the new range when asserting
EQ_EXPR predicates.
(extract_range_from_ssa_name): Update the equivalence set of
the new range with VAR.
(extract_range_from_binary_expr): Also handle TRUTH_*_EXPR.
If -fwrapv is used, set the resulting range to VARYING if the
operation overflows. Otherwise, use TYPE_MIN_VALUE and
TYPE_MAX_VALUE to represent -INF and +INF.
Fix handling of *_DIV_EXPR.
(extract_range_from_unary_expr): Handle MINUS_EXPR and
ABS_EXPR properly by switching the range around if necessary.
(extract_range_from_comparison): New local function.
(extract_range_from_expr): Call it.
(adjust_range_with_scev): Do not adjust the range if using
wrapping arithmetic (-fwrapv).
(dump_value_range): Also show equivalence set.
Show -INF and +INF for TYPE_MIN_VALUE and TYPE_MAX_VALUE.
(build_assert_expr_for): Also build ASSERT_EXPR for EQ_EXPR.
(infer_value_range): Change return value to bool.
Add arguments 'comp_code_p' and 'val_p'.
Do not attempt to infer ranges from statements that may throw.
Store the comparison code in comp_code_p.
Store the other operand to be used in the predicate in val_p.
(dump_asserts_for): New.
(debug_asserts_for): New.
(dump_all_asserts): New.
(debug_all_asserts): New.
(register_new_assert_for): New.
(register_edge_assert_for): New.
(find_conditional_asserts): New.
(find_assert_locations): New.
(process_assert_insertions_for): New.
(process_assert_insertions): New.
(insert_range_assertions): Initialize found_in_subgraph,
blocks_visited, need_assert_for and asserts_for.
Call find_assert_locations and process_assert_insertions.
(remove_range_assertions): Add more documentation.
(vrp_initialize): Change return type to void.
Do not try to guess if running VRP is worth it.
(compare_name_with_value): New.
(compare_names): New.
(vrp_evaluate_conditional): Add argument 'use_equiv_p'. If
use_equiv_p is true, call compare_names and
compare_name_with_value to compare all the ranges for every
name in the equivalence set of the predicate operands.
Update all callers.
(vrp_meet): Try harder not to derive a VARYING range.
If two values meet, the resulting equivalence set is the
intersection of the two equivalence sets.
(vrp_visit_phi_node): Call copy_value_range to get the current
range information of the LHS.
(vrp_finalize): Create a value vector representing all the
names that ended up with exactly one value in their range.
Call substitute_and_fold.
(execute_vrp): Document equivalence sets in ranges.
* tree.h (SSA_NAME_VALUE_RANGE): Remove.
(struct tree_ssa_name): Remove field value_range.
(invert_tree_comparison): Declare.
testsuite/ChangeLog
2005-06-01 Diego Novillo <dnovillo@redhat.com>
PR 14341, PR 21332, PR 20701, PR 21086, PR 21090
PR 21289, PR 21348, PR 21367, PR 21368, PR 21458.
* gcc.dg/tree-ssa/pr14341.c: New test.
* gcc.dg/tree-ssa/pr14841.c: New test.
* gcc.dg/tree-ssa/pr20701.c: New test.
* gcc.dg/tree-ssa/pr21086.c: New test.
* gcc.dg/tree-ssa/pr21090.c: New test.
* gcc.dg/tree-ssa/pr21332.c: New test.
* gcc.dg/tree-ssa/pr21458.c: New test.
* gcc.dg/tree-ssa/pr21658.c: New test.
* gcc.dg/tree-ssa/vrp01.c: New test.
* gcc.dg/tree-ssa/vrp02.c: New test.
* gcc.dg/tree-ssa/vrp03.c: New test.
* gcc.dg/tree-ssa/vrp04.c: New test.
* gcc.dg/tree-ssa/vrp05.c: New test.
* gcc.dg/tree-ssa/vrp06.c: New test.
* gcc.dg/tree-ssa/vrp07.c: New test.
* gcc.dg/tree-ssa/vrp08.c: New test.
* gcc.dg/tree-ssa/vrp09.c: New test.
* gcc.dg/tree-ssa/vrp10.c: New test.
* gcc.dg/tree-ssa/vrp11.c: New test.
* gcc.dg/tree-ssa/vrp12.c: New test.
* gcc.dg/tree-ssa/vrp13.c: New test.
Bryce McKinlay [Wed, 1 Jun 2005 22:55:07 +0000 (22:55 +0000)]
configure.ac (BACKTRACESPEC): Remove definition, but continue to AC_SUBST definition from configure.host.
* configure.ac (BACKTRACESPEC): Remove definition, but continue to
AC_SUBST definition from configure.host.
* configure.host: Don't use -fno-omit-frame-pointer. Set BACKTRACESPEC
to -fomit-frame-pointer on 32-bit x86 targets.
Ziga Mahkovec [Wed, 1 Jun 2005 22:11:00 +0000 (00:11 +0200)]
re PR libgcj/20435 (regex pattern compiling bug)
2005-06-01 Ziga Mahkovec <ziga.mahkovec@klika.si>
PR libgcj/20435:
* gnu/regexp/RESyntax.java (RE_POSSESSIVE_OPS): New field.
(static): Add possessive matching to JAVA_1_4 syntax.
* gnu/regexp/RETokenRepeated.java (possessive): New field.
(makePossessive, isPossessive): New methods.
(match): Don't back off during possessive matching.
* gnu/regexp/RE.java (initalize): Accept possessive quantifier.
* java/util/regex/Pattern.java (constructor): Switch syntax from PERL5
to JAVA_1_4.
Keith Seitz [Wed, 1 Jun 2005 20:04:05 +0000 (20:04 +0000)]
JdwpPacket.java: New file.
* gnu/classpath/jdwp/transport/JdwpPacket.java: New file.
* gnu/classpath/jdwp/transport/JdwpCommandPacket.java: New file.
* gnu/classpath/jdwp/transport/JdwpReplyPacket.java: New file.
Roger Sayle [Wed, 1 Jun 2005 19:17:37 +0000 (19:17 +0000)]
intrinsic.c (add_conv): No longer take a "simplify" argument as its always gfc_convert_constant...
* intrinsic.c (add_conv): No longer take a "simplify" argument as
its always gfc_convert_constant, instead take a "standard" argument.
(add_conversions): Change all existing calls of add_conv to pass
GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
extensions support integer-logical and logical-integer conversions.
(gfc_convert_type_warn): Warn about use the use of these conversions
as a extension when appropriate, i.e. with -pedantic.
* simplify.c (gfc_convert_constant): Add support for integer to
logical and logical to integer conversions, using gfc_int2log and
gfc_log2int.
* arith.c (gfc_log2int, gfc_int2log): New functions.
* arith.h (gfc_log2int, gfc_int2log): Prototype here.
* gfortran.texi: Document this new GNU extension.
* gfortran.dg/logint-1.f: New test case.
* gfortran.dg/logint-2.f: Likewise.
* gfortran.dg/logint-3.f: Likewise.
* stmt.c (expand_case): Use build_int_cst.
(node_has_low_bound): Likewise, and correct type mismatch.
(node_has_high_bound): Likewise.
* fold-const.c (fold_binary): Ensure we build trees
with the correct types - undo what STRIP_NOPS possibly did.
tree.h (fold_indirect_ref_1): Export from fold-const.c.
2005-06-01 Richard Guenther <rguenth@gcc.gnu.org>
* tree.h (fold_indirect_ref_1): Export from fold-const.c.
* fold-const.c (fold_indirect_ref_1): No longer static.
* tree-inline.c (copy_body_r): Use fold_indirect_ref_1 for
folding, if possible.
* arm.md (attribute 'type'): Add new types - f_loads floadd, f_stores,
f_stored, f_flag, f_cvt.
(generic_sched): No-longer used for the arm1020e and arm1022e cores.
Include arm1020e.md.
* vfp.md (fmstat): New cpu unit. Add an exclusion set between it and
the ds and fmac pipelines. Re-work all load and store patterns and
all conversion patterns to use new attributes. Adjust reservation
descriptions accordingly.
* arm1020e.md: New file.
* t-arm: Add dependency.
Jakub Jelinek [Wed, 1 Jun 2005 10:23:17 +0000 (12:23 +0200)]
re PR c/21536 (C99 array of variable length use causes segmentation fault)
PR c/21536
PR c/20760
* gimplify.c (gimplify_decl_expr): Call gimplify_type_sizes
on variable sizes types if a decl is a pointer to a VLA.
(gimplify_type_sizes): Handle POINTER_TYPE and REFERENCE_TYPE.
Call gimplify_type_sizes on aggregate fields. Prevent infinite
recursion.
Paul Thomas [Wed, 1 Jun 2005 07:18:20 +0000 (07:18 +0000)]
trans-expr.c (gfc_conv_variable): Clean up bracketting.
2005-06-01 Paul Thomas <pault@gcc.gnu.org>
* fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
* fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
Correct comments and replace convert of integer_one_node with
build_int_cst.
* opts.h (cl_option_state): New structure.
(get_option_state): Declare.
* opts.c (get_option_state): New function.
* toplev.c (option_affects_pch_p): New function.
(default_get_pch_validity): Store the state of all options for which
option_affects_pch_p returns true.
(default_pch_valid_p): Check the state of those options here.
Only check target_flags separately if targetm.check_pch_target_Flags
is nonnull or if TARGET_SWITCHES is defined.
* config/rs6000/rs6000.md (sync_boolcshort_internal): New.
* config/rs6000/rs6000.c (rs6000_emit_sync): Shift count must
be complemented for big-endian. Mask for AND must be rotated,
not shifted. Handle short operands with NOT on the memory
operation.
DJ Delorie [Wed, 1 Jun 2005 00:20:13 +0000 (20:20 -0400)]
expr.c (convert_move): When a partial_int requires multiple conversion steps...
* expr.c (convert_move): When a partial_int requires multiple
conversion steps, make sure successive steps convert the
intermediate value, not the original value.
* expmed.c (expand_mult): Convert partial_int multiplies to
shift/add combinations too.
* genmodes.c (mode_data): Add wider_2x.
(calc_wider_mode): Calculate twice-wider mode too.
(emit_mode_wider): Emit twice-wider mode too.
* machmode.h (mode_2xwider, GET_MODE_2XWIDER_MODE): New.
* expr.c (expand_expr_real_1): Use it for expanding
multiplies.
Nathan Sidwell [Tue, 31 May 2005 17:43:26 +0000 (17:43 +0000)]
re PR c++/21165 (bogus error on a user-defined conversion in a template)
cp:
PR c++/21165
* init.c (integral_constant_value): Check the type of the
initializer, not the decl.
testsuite:
PR c++/21165
* g++.dg/template/init5.C: New.
Paul Thomas [Tue, 31 May 2005 17:39:03 +0000 (17:39 +0000)]
char_initialiser_actual.f90: Test character initialisers as actual arguments.
2005-05-30 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/char_initialiser_actual.f90:
Test character initialisers as actual arguments.
* gfortran.dg/char_pointer_comp_assign.f90:
Test character pointer structure component assignments.
* gfortran.dg/char_array_structure_constructor.f90:
Test character components in structure constructors.
Paul Thomas [Tue, 31 May 2005 17:19:11 +0000 (17:19 +0000)]
re PR fortran/18109 (ICE with explicit array of strings)
2005-05-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18109
PR fortran/18283
PR fortran/19107
* fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
string length from the expression typespec character length value
and set temp_ss->stringlength and backend_decl. Obtain the
tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
Dereference the expression to obtain the character.
* fortran/trans-expr.c (gfc_conv_component_ref): Remove the
dereference of scalar character pointer structure components.
* fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
string length for the structure component from the component
expression.
Andrew Pinski [Tue, 31 May 2005 16:29:16 +0000 (16:29 +0000)]
re PR tree-optimization/21732 (-ftree-dump-all-details hangs during *.c.t24.copyprop or *.c.t38.copyprop2)
2005-05-31 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/21732
* tree-ssa-copy.c (dump_copy_of): Create a bitmap and don't visit a
SSA_NAME twice and cause the loop to become finite. Remove the test
for val.
tm.texi (TARGET_GET_PCH_VALIDITY, [...]): Tweak the documentation to make it more future-proof.
* doc/tm.texi (TARGET_GET_PCH_VALIDITY, TARGET_PCH_VALID_P): Tweak
the documentation to make it more future-proof.
(TARGET_CHECK_PCH_TARGET_FLAGS): Document this new hook.
* target.h (gcc_target): Add check_pch_target_flags.
* target-def.h (TARGET_CHECK_PCH_TARGET_FLAGS): New macro.
(TARGET_INITIALIZER): Include it.
* toplev.c (default_pch_valid_p): Use targetm.check_pch_target_flags.
* config/sh/sh.h (sh_pch_valid_p): Delete.
* config/sh/sh.c (TARGET_PCH_VALID_P, sh_pch_valid_p): Delete.
(sh_check_pch_target_flags): New function.
(TARGET_CHECK_PCH_TARGET_FLAGS): Override default.
Jeff Law [Tue, 31 May 2005 14:33:29 +0000 (08:33 -0600)]
fold-const.c (extract_array_ref): Handle more cases, do some useful canonicalization of the base.
* fold-const.c (extract_array_ref): Handle more cases,
do some useful canonicalization of the base.
(fold_binary): Explicitly deal with arrays of zero-sized
structures during folding of &a[i] == &a[j].