* gcc.dg/pr16194.c: We now output error on all three functions, not just
first one.
* cgraph.c: Include tree-flow.h
(cgraph_add_new-function): Handle IPA_SSA mode; execute
early_local_passes.
* cgraph.h (enum cgraph_state): Add CGRAPH_STATE_IPA_SSA.
* tree-pass.h (pass_all_early_optimizations): Declare.
* cgraphunit.c (cgraph_process_new_functions): Add IPA_SSA; execute
early_local_passes.
(cgraph_analyze_function): Do early_local_passes.
* tree-mudflap.c (mf_decl_cache_locals, mf_build_check_statement_for):
Do not add referenced vars.
* tree-optimize.c (gate_all_optimizations): Do not execute when not in
SSA form.
(gate_all_early_local_passes): New gate.
(pass_early_local_passes): Use new gate.
(execute_early_local_optimizations): New functions.
(gate_all_early_optimizations): New gate.
(pass_all_early_optimizations): New pass.
(execute_free_datastructures): Free SSA only when initialized.
(gate_init_datastructures): Init only when optimizing.
(tree_lowering_passes): Do early local passes when called late.
* tree-profile.c (do_tree_profiling): Don't profile functions added
late.
(do_early_tree_profiling, pass_early_tree_profile): Kill.
* tree-cfg.c (update_modified_stmts): Do not update when operands are
not active.
* passes.c (init_optimizations_passes): Reorder so we go into SSA
during early_local_passes.
* Makefile.in (cgraph.o): Add dependency on tree-flow.h.
From-SVN: r120373
gcc/
2007-01-02 Carlos O'Donell <carlos@codesourcery.com>
* Makefile.in: Export GCC_EXEC_PREFIX before calling $(RUNTEST)
in $(lang_checks) and check-consistency targets.
From-SVN: r120359
* tree-mudflap.c (mf_decl_cache_locals, mf_build_check_statement_for):
Do not add referenced vars.
* tree-cfg.c (update_modified_stmts): Do not update when SSA operands
are not active.
* passes.c (init_optimization_passes): Put mudflap_2 after
free_datastructures.
From-SVN: r120358
2007-01-02 Jan Hubicka <jh@suse.cz>
* tree-optimize (execute_fixup_cfg): Set after_inlining flag.
Set NOTHROW flag on call statements proved to be nothrow.
Update statement of local calls so new pure/const functions are
updated. Update_ssa when in ssa form. Mark PHI nodes of nonlocal
goto receivers.
(tree_rest_of_compilation): Register hooks and initialize bitmap
early. Do not set after_inlining flag.
From-SVN: r120357
./: * c-common.c (c_common_truthvalue_conversion): When warning about
using an assignment as a truth value, set TREE_NO_WARNING.
cp/:
* semantics.c (maybe_convert_cond): Optionally warn when using an
assignment as a condition.
* typeck.c (convert_for_assignment): Optionally warn about
assigning the result of an assignment to a bool.
testsuite/:
* g++.dg/warn/Wparentheses-22.C: New test.
* g++.dg/warn/Wparentheses-23.C: New test.
From-SVN: r120348
2007-01-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20896
* interface.c (check_sym_interfaces): Remove call to
resolve_global_procedure.
gfortran.h : Remove prototype for resolve_global_procedure.
resolve.c (resolve_global_procedure): Add static attribute
to function declaration.
2007-01-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20896
* gfortran.dg/interface_10.f90: Remove.
From-SVN: r120342
2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
* c-common.c(c_common_nodes_and_builtins): Since variants of
void_type_node get built before it is given a name, we need to
give those variants the name, too.
(complete_array_type): We need to work with the canonical main
type of the array, from which we will build the qualified version.
* params.def (PARAM_VERIFY_CANONICAL_TYPES): New.
* print-tree.c (print_node): Display canonical type information
for each type.
* stor-layout.c (layout_type): When we don't know the
alignment of a type for which we're building an array, we end up
guessing wrong, so make the type require structural equality.
* tree.c (make_node_stat): When we build a new type, it is its
own canonical type.
(build_type_attribute_qual_variant): When building an attribute
variant, its canonical type is the non-attribute variant. However,
if the attributes are target-dependent and they differ, we need to
use structural equality checks for this type.
(build_qualified_type): A qualified type is not equivalent to its
unqualified variant; set the canonical type appropriately.
(build_distinct_type_copy): When building a distinct type from
another type, the new type is its own canonical type.
(build_variant_type_copy): When building a new type variant, we
assume that it is equivalent to the original type.
(build_pointer_type_for_mode): When building a pointer type, also
build a canonical type pointer.
(build_reference_type_for_mode): When building a reference type,
also build a canonical type reference.
(build_index_type): When we can't hash an index type (e.g.,
because its maximum value is negative), the index type requires
structural equality tests.
(build_array_type): Build the canonical form of an array type.
(build_function_type): Function types require structural equality,
because they contain default arguments, attributes, etc.
(build_method_type_directly): Ditto for method types.
(build_offset_type): Build the canonical offset type.
(build_complex_type): Build the canonical vector type.
(make_vector_type): Build the canonical vector type.
* tree.h (TYPE_CANONICAL): New.
(TYPE_STRUCTURAL_EQUALITY_P): New.
(SET_TYPE_STRUCTURAL_EQUALITY): New.
(struct tree_type): Added "canonical" field.
* params.h (VERIFY_CANONICAL_TYPES): New.
* doc/c-tree.texi (TYPE_CANONICAL): Document.
(TYPE_STRUCTURAL_EQUALITY_P): Document.
(SET_TYPE_STRUCTURAL_EQUALITY): Document.
* doc/invoke.texi (verify-canonical-types): Document --param
parameter for verifying canonical types.
2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
* typeck.c (structural_comptypes): Renamed from "comptypes".
(comptypes): Use canonical type information to perform fast type
comparison. When VERIFY_CANONICAL_TYPES, verify that the
canonical type comparison returns the same results as we would see
from the current, structural check. Support COMPARE_STRUCTURAL
when we need structural checks.
* decl.c (typename_compare): Fix comment.
(build_typename_type): TYPENAME_TYPE nodes require structural
equality checks, because they resolve different based on the
current class type.
(make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
require structural equality checks (for now).
(build_ptrmemfunc_type): Build the canonical pointer to member
function type.
(compute_array_index_type): Whenever we build a new index type
to represent the size of an array in a template, we need to mark
this index type as requiring structural equality. This goes for
arrays with value-dependent sizes with the current ABI, or all
arrays with ABI-1.
* tree.c (cplus_array_hash): New.
(struct cplus_array_info): New.
(cplus_array_compare): New.
(cplus_array_htab): New.
(build_cplus_array_type_1): Use a hash table to cache the array
types we build. Build the canonical array type for each array
type.
(cp_build_qualified_type_real): When building a cv-qualified array
type, use the hash table of array types and build canonical array
types as necessary.
(bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
use structural equality (for now).
* cp-tree.h (COMPARE_STRUCTURAL): New.
* pt.c (canonical_template_parms): New.
(canonical_type_parameter): New.
(process_template_parm): Find the canonical type parameter.
(lookup_template_class): When we have named the primary template
type, set the canonical type for our template class to the primary
template type. If any of the template arguments need structural
equality checks, the template class needs structural equality
checks.
(tsubst): When reducing the level of a template template
parameter, we require structural equality tests for the resulting
parameter because its template parameters have not had their types
canonicalized. When reducing a template type parameter, find the
canonical reduced type parameter.
(any_template_arguments_need_structural_equality_p): New.
2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
* objc-act.c (objc_build_volatilized_type): Keep track of
canonical types.
(objc_get_protocol_qualified_type): Ditto.
From-SVN: r120341
* fold-const.c (fold_binary) <EQ_EXPR>: Fold "(X^C1) eq/ne C2" into
"X eq/ne (C1^C2)". Fold "(X^Z) eq/ne (Y^Z)" as "X eq/ne Y" when Z
has no side-effects. Fold "(X^C1) eq/ne (Y^C2)" as "(X^(C1^C2))
eq/ne Y".
* gcc.dg/fold-eqxor-4.c: New test case.
From-SVN: r120333
gcc:
* configure.ac: Remove support for building with Apple's gcc-3.1.
config:
* mh-ppc-darwin: Remove support for building with Apple's gcc-3.1.
From-SVN: r120331
gcc:
PR middle-end/30311
* caller-save.c (add_stored_regs): Only handle SUBREGs if inner
REG is a hard register. Do not modify REG before calling
subreg_nregs.
* rtlanal.c (subreg_get_info): Don't assert size of XMODE is a
multiple of the size of YMODE for certain lowpart cases.
gcc/testsuite:
* gcc.c-torture/compile/pr30311.c: New test.
From-SVN: r120329
PR target/29166
* config/ia64/ia64.c (ia64_compute_frame_size): Account space for
save of BR0 in extra_spill_size instead of spill_size.
(ia64_expand_prologue): Save BR0 outside of the gr/br/fr spill
area.
(ia64_expand_epilogue): Restore BR0 from its new location.
testsuite/:
* g++.dg/eh/pr29166.C: New test.
From-SVN: r120319
2007-01-01 Andrew Pinski <pinskia@gmail.com>
* gimplify.c (gimplify_init_constructor <case VECTOR_TYPE>):
Use a temporary variable if the left hand side is not a gimple
register.
From-SVN: r120318
2007-01-01 Andrew Pinski <pinskia@gmail.com>
* gimplify.c (gimplify_return_expr): Make the temporary variable
for the return expression, a gimple register variable.
From-SVN: r120317
PR middle-end/30322
* fold-const.c (fold_binary): Fold X + ~X and ~X + X into -1 when
we don't care about trapping overflow. Only convert -A - 1 into ~A
when we don't care about trapping overflow.
* gcc.dg/fold-plusnot-1.c: New test case.
From-SVN: r120300
2006-12-31 Simon Martin <simartin@users.sourceforge.net>
PR c++/29731
* parser.c (cp_parser_primary_expression): Return error_mark_node when
a statement-expression is found outside of a function body.
From-SVN: r120299
2006-12-31 Richard Guenther <rguenther@suse.de>
PR middle-end/30338
* fold-const.c (fold_binary): Fix type-mismatch in folding
of -1 - A to ~A.
* gcc.c-torture/compile/pr30338.c: New testcase.
From-SVN: r120297
2006-12-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27900
* resolve.c (resolve_actual_arglist): If all else fails and a
procedure actual argument has no type, see if a specific
intrinsic matches.
PR fortran/24325
* resolve.c (resolve_function): If the function reference is
FL_VARIABLE this is an error.
2006-12-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27900
* gfortran.dg/intrinsic_actual_4.f90: New test.
PR fortran/24325
* gfortran.dg/func_decl_3.f90: New test.
From-SVN: r120296
2006-12-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23060
* intrinsic.c (compare_actual_formal ): Distinguish argument
list functions from keywords.
* intrinsic.c (sort_actual): If formal is NULL, the presence of
an argument list function actual is an error.
* trans-expr.c (conv_arglist_function) : New function to
implement argument list functions %VAL, %REF and %LOC.
(gfc_conv_function_call): Call it.
* resolve.c (resolve_actual_arglist): Add arg ptype and check
argument list functions.
(resolve_function, resolve_call): Set value of ptype before
calls to resolve_actual_arglist.
* primary.c (match_arg_list_function): New function.
(gfc_match_actual_arglist): Call it before trying for a
keyword argument.
2006-12-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23060
* gfortran.dg/c_by_val.c: Called by c_by_val_1.f.
* gfortran.dg/c_by_val_1.f: New test.
* gfortran.dg/c_by_val_2.f: New test.
* gfortran.dg/c_by_val_3.f: New test.
From-SVN: r120295