./: * c-common.c (skip_evaluation): Don't define.
(c_inhibit_evaluation_warnings): Define global variable.
(overflow_warning): Check c_inhibit_evaluation_warnings rather
than skip_evaluation.
(convert_and_check, warn_for_div_by_zero): Likewise.
* c-common.h (skip_evaluation): Don't declare.
(c_inhibit_evaluation_warnings): Declare.
* c-parser.c (c_parser_typeof_specifier): Set
c_inhibit_evaluation_warnings rather than skip_evaluation.
(c_parser_conditional_expression): Likewise.
(c_parser_binary_expression): Likewise.
(c_parser_sizeof_expression): Likewise.
(c_parser_alignof_expression): Likewise.
* c-typeck.c (build_indirect_ref): Check
c_inhibit_evaluation_warnings rather than skip_evaluation.
(build_conditional_expr, build_binary_op): Likewise.
cp/:
* parser.c (cp_unevaluated_operand): Define global variable.
(cp_parser_question_colon_clause): Increment
c_inhibit_evaluation_warnings when evaluating an expression which
will never be executed.
(cp_parser_decltype): Increment cp_unevaluated_operand and
c_inhibit_evaluation_warnings, not skip_evaluation.
(cp_parser_sizeof_operand): Likewise.
(cp_parser_enclosed_template_argument_list): Save
cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
skip_evaluation.
* cp-tree.h (struct saved_scope): Remove skip_evaluation field.
Add unevaluated_operand and inhibit_evaluation_warnings fields.
(cp_unevaluated_operand): Declare.
* name-lookup.c (push_to_top_level): Save cp_unevaluated_operand
and c_inhibit_evaluation_warnings rather than skip_evaluation.
(pop_from_top_level): Restore cp_unevaluated_operand and
c_inhibit_evaluation_warnings rather than skip_evaluation.
* class.c (build_base_path): Check cp_unevaluated_operand rather
than skip_evaluation.
* typeck.c (build_class_member_access_expr): Likewise.
(cp_build_binary_op): Don't warn about bad shift counts if
c_inhibit_evaluation_warnings is non-zero.
* pt.c (coerce_template_parms): Save state of
cp_unevaluated_operand and c_inhibit_evaluation_warnings, not
skip_evaluation.
(tsubst_aggr_type): Likewise.
(tsubst_pack_expansion): Check cp_unevaluated_operand rather than
skip_evaluation.
(tsubst_copy): Likewise.
(tsubst): Set cp_unevaluated_operand and
c_inhibit_evaluation_warnings, not skip_evaluation.
(tsubst_copy_and_build): Likewise.
* call.c (convert_arg_to_ellipsis): Check cp_unevaluated_operand
rather than skip_evaluation.
* decl2.c (mark_used): Likewise.
* semantics.c (finish_non_static_data_member): Likewise.
* cvt.c (cp_convert_and_check): Check
c_inhibit_evaluation_warnings rather than skip_evaluation.
* mangle.c (write_type): Set cp_unevaluated_operand rather than
skip_evaluation.
testsuite/:
* g++.dg/warn/skip-1.C: New testcase.
From-SVN: r148535
2009-06-16 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (do_ds_constraint): Stores in global
variables add them to ESCAPED.
(find_func_aliases): Do not make all indirectly stored values
escaped.
* gcc.dg/tree-ssa/pta-escape-1.c: New testcase.
* gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
* gcc.dg/tree-ssa/pta-escape-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-27.c: Likewise.
From-SVN: r148525
2009-06-16 Rafael Avila de Espindola <espindola@google.com>
* config/i386/winnt.c (i386_pe_encode_section_info): Update call to
make_decl_one_only.
From-SVN: r148523
2009-06-16 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40432
* tree-sra.c (sra_modify_assign): When creating VIEW_CONVERT_EXPR,
check whether we need to force gimple register operand.
* testsuite/gcc.c-torture/compile/pr40432.c: New file.
From-SVN: r148522
2009-06-16 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40413
* tree-sra.c (load_assign_lhs_subreplacements): Pass offset to
build_ref_for_offset.
(propagate_subacesses_accross_link): Fix a typo in a comment.
* testsuite/gfortran.fortran-torture/compile/pr40413.f90: New file.
From-SVN: r148520
2009-06-16 Basile Starynkevitch <basile@starynkevitch.net>
* gcc/doc/plugins.texi (Interacting with the GCC Garbage Collector):
Mention the plugin mode of gengtype.
* gcc/doc/gty.texi (Source Files Containing Type Information):
Likewise.
* gcc/gengtype.c: Updated copyright.
(plugin_files, nb_plugin_files) Added new static variables.
(measure_input_list) Care about plugin_files.
(write_rtx_next): Added early return in plugin mode.
(create_file): Updated copyright year in generated file. Added
asserts.
(oprintf): Added early return if NULL outf.
(get_output_file_with_visibility): Care of plugin_files.
(get_output_file_name): May return null.
(write_local): Added early return.
(put_mangled_filename): Ditto.
(finish_root_table): Added check for base_files.
(write_roots): Care about null when plugins.
(main): Added plugin mode.
From-SVN: r148515
./: * df-problems.c (df_simulate_one_insn_forwards): Fix braces in
switch.
* gcov.c (read_count_file): Add braces around variables declared
before label.
* c.opt (Wjump-misses-init): New warning.
* c-opts.c (c_common_handle_option): Set warn_jump_misses_init for
-Wall and -Wc++-compat if not already set.
(c_common_post_options): Clear warn_jump_misses_init if it was not
set.
* c-decl.c (struct c_binding): Change type field to a union with
new label field. Make it the first field in the struct. Update
references to type to use u.type instead.
(struct c_spot_bindings): Define.
(struct c_goto_bindings): Define.
(c_goto_bindings_p): Define, along with VECs.
(struct c_label_vars): Define.
(struct c_scope): Add has_label_bindings field.
(bind_label, set_spot_bindings): New static functions.
(decl_jump_unsafe, update_spot_bindings): New static functions.
(update_label_decls): New static function.
(pop_scope): Call update_label_decls. Don't call c_end_vm_scope.
Update binding u.label field to shadowed field.
(c_binding_start_stmt_expr): New function.
(c_binding_end_stmt_expr): New function.
(pushdecl): Don't call c_begin_vm_scope.
(make_label): Add defining and p_label_vars parameters. Change
all callers.
(lookup_label): Correct test for whether a label has not yet been
defined. Call bind_label rather than bind.
(warn_about_goto): New static function.
(lookup_label_for_goto): New function.
(declare_label): Call bind_label rather than bind.
(check_earlier_gotos): New static function.
(define_label): Don't give errors about jumping into statement
expressions or scopes of variably modified types. Call
set_spot_bindings and check_earlier_gotos. Call bind_label
instead of bind. Don't set label_context_stack_se or
label_context_stack_vm.
(c_get_switch_bindings): New function.
(c_release_switch_bindings): New function.
(c_check_switch_jump_warnings): New function.
(start_function): Don't set label_context_stack_se or
label_context_stack_vm.
(finish_function): Likewise.
* c-typeck.c (label_context_stack_se): Don't define.
(label_context_stack_vm): Don't define.
(c_finish_goto_label): Call lookup_label_for_goto rather than
lookup_label. Don't give errors about jumping into a statement
expression or the scope of a variably modified type. Don't set
label_context_stack_se or label_context_stack_vm.
(struct c_switch): Remove blocked_stmt_expr and blocked_vm
fields. Add bindings field.
(c_start_case): Don't set deleted fields. Set bindings field.
(do_case): Rework order of tests. Don't check blocked_stmt_expr
or blocked_vm. Call c_check_switch_jump_warnings.
(c_finish_case): Don't test blocked_stmt_expr field. Call
c_release_switch_bindings.
(c_begin_stmt_expr): Don't increment blocked_stmt_expr in
c_switch_stack. Don't walk label_context_stack_se labels. Don't
set label_context_stack_se. Call c_bindings_start_stmt_expr.
(c_finish_stmt_expr): Don't decrement blocked_stmt_expr in
c_switch_stack. Don't walk label_context_stack_se labels. Don't
set label_context_stack_se. Call c_bindings_end_stmt_expr.
(c_begin_vm_scope, c_end_vm_scope): Don't define.
* c-tree.h (C_DECL_UNJUMPABLE_STMT_EXPR): Don't define.
(C_DECL_UNDEFINABLE_STMT_EXPR): Don't define.
(C_DECL_UNJUMPABLE_VM): Don't define.
(C_DECL_UNDEFINABLE_VM): Don't define.
(struct c_label_list): Don't define.
(struct c_label_context_se): Don't define.
(struct c_label_context_vm): Don't define.
(struct c_spot_bindings): Declare.
(c_bindings_start_stmt_expr): Declare.
(c_bindings_end_stmt_expr): Declare.
(lookup_label_for_goto): Declare.
(c_get_switch_bindings, c_release_switch_bindings): Declare.
(c_check_switch_jump_warnings): Declare.
(label_context_stack_se, label_context_stack_vm): Don't declare.
(c_finish_goto_label): Update declaration.
(c_begin_vm_scope, c_end_vm_scope): Don't declare.
* doc/invoke.texi (Option Summary): Mention -Wjump-misses-init.
(Warning Options): Document -Wjump-misses-init.
cp/:
* parser.c (cp_parser_direct_declarator): Add braces around
variables declared before label.
objc/:
* objc-act.c (objc_start_function): Don't set
label_context_stack_se or label_context_stack_vm.
testsuite/:
* gcc.dg/Wjump-misses-init-1.c: New testcase.
* gcc.dg/Wjump-misses-init-2.c: New testcase.
* gcc.dg/c99-vla-jump-5.c: Adjust expected error messages.
Recognize new notes.
* gcc.dg/stmt-expr-label-2.c: Likewise.
* gcc.dg/c99-vla-jump-1.c: Recognize new notes. Fix column
numbers.
* gcc.dg/c99-vla-jump-2.c: Recognize new notes.
* gcc.dg/c99-vla-jump-3.c: Recognize new notes.
* gcc.dg/c99-vla-jump-4.c: Likewise.
* gcc.dg/stmt-expr-label-1.c: Likewise.
* gcc.dg/stmt-expr-label-3.c: Likewise.
* gcc.dg/vla-8.c: Likewise. Move error message to different
line.
From-SVN: r148512
* python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't
set self.iter.
(StdMapPrinter.to_string): Make a new iterator.
(StdMapPrinter.children): Likewise.
(StdSetPrinter.__init__): Don't set self.iter.
(StdSetPrinter.to_string): Make a new iterator.
(StdSetPrinter.children): Likewise.
From-SVN: r148506
PR testsuite/40426
* lib/gcc-dg.exp (gcc-dg-debug-runtest): For type -gdwarf-2 and
level != "" use separate -gdwarf-2 -g${level} options instead of
-gdwarf-2${level}.
* lib/gfortran-dg.exp (gfortran-dg-debug-runtest): Likewise.
* gfortran.dg/debug/pr37738.f: Also skip if -gdwarf-2 -g1.
* gfortran.dg/debug/pr35154-dwarf2.f: Likewise.
From-SVN: r148497
2009-06-14 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.dg/optimize-bswap-1.c: Split into these two:
* gcc.dg/optimize-bswapsi-1.c: New testcase.
* gcc.dg/optimize-bswapdi-1.c: New testcase.
From-SVN: r148487
2009-06-14 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* passes.c: Add bswap pass.
* tree-pass.h: Add pass_optimize_bswap declaration.
* tree-ssa-math-opts.c: Include diagnostics.h for print_gimple_stmt.
Include rtl.h, expr.h and optabs.h for optab_handler check.
(struct symbolic_number, pass_optimize_bswap): New definition.
(do_shift_rotate, verify_symbolic_number_p): New functions.
(find_bswap_1, find_bswap, execute_optimize_bswap): New functions.
(gate_optimize_bswap): New function.
* tree.c (widest_int_cst_value): New function.
* tree.h (widest_int_cst_value): Prototype added.
2009-06-14 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.dg/optimize-bswap-1.c: New testcase.
From-SVN: r148471
2009-06-14 Richard Guenther <rguenther@suse.de>
PR middle-end/40389
* gimple.c (walk_stmt_load_store_addr_ops): The LHS of a call
has its address taken if NRV was applied and it is addressable.
* tree-ssa-structalias.c (get_constraint_for_address_of): New
function split out from ...
(get_constraint_for_1): ... here.
(handle_rhs_call): Use it to mark the return slot escaped if
it is addressable and NRV was applied.
* g++.dg/torture/pr40389.C: New testcase.
From-SVN: r148462
* config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin):
Change first argument type to location_t.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Same.
Do not set input_location.
Use loc instead of input_location throughout.
objcp/
* objcp-decl.h (start_struct): Add location argument.
(finish_struct): Same.
(finish_decl): New.
From-SVN: r148461
PR target/40327
* arm/constraints.md (Pa, Pb): New constraints.
* arm/arm.md (thumb1_addsi3): Support more complex additions. Add a
split pattern to deal with them.
From-SVN: r148452
* timevar.def (TV_COMBINE_STACK_ADJUST): New timevar.
* combine-stack-adj.c (pass_stack_adjustments): Use it.
* Makefile.in: Fix GGC dependency for gcse.o.
From-SVN: r148444