2010-11-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46528
PR debug/46338
* profile.c (branch_prob): Do not split blocks based on locations
from debug statements.
From-SVN: r167171
PR middle-end/46647
* builtins.c (fold_builtin_memset): Check c is INTEGER_CST instead
of host_integerp check. Use TREE_INT_CST_LOW instead of tree_low_cst.
* gcc.dg/pr46647.c: New test.
From-SVN: r167170
* config/pa/pa.md (negdf2): Condition on !flag_signed_zeros instead of
flag_unsafe_math_optimizations.
(negsf2): Likewise.
Move fnegabs related patterns together. Only use fmpynfadd instruction
to negate a multiply if !flag_signed_zeros is true.
From-SVN: r167159
2010-11-25 Janus Weil <janus@gcc.gnu.org>
PR fortran/46581
* trans.h (gfc_process_block_locals): Removed second argument.
* trans-decl.c (trans_associate_var): Moved to trans-stmt.c.
(gfc_trans_deferred_vars): Skip ASSOCIATE variables.
(gfc_process_block_locals): Don't mark associate names to be
initialized.
* trans-stmt.c (trans_associate_var): Moved here from trans-decl.c.
(gfc_trans_block_construct): Call 'trans_associate_var' from here
to make sure SELECT TYPE with associate-name is treated correctly.
2010-11-25 Janus Weil <janus@gcc.gnu.org>
PR fortran/46581
* gfortran.dg/select_type_19.f03: New.
From-SVN: r167154
2010-11-25 François Dumont <francois.cppdevs@free.fr>
* src/debug.cc: Introduce a mutex pool in get_safe_base_mutex.
Move code used to manipulate sequence safe iterators from safe
iterator methods to safe sequence ones. Remove usage of safe iterator
mutex, keep _Safe_iterator_base::_M_get_mutex for library backward
binary compatibility.
* src/Makefile.am: Build debug.cc in gnu++0x mode for _Hash_impl usage.
* src/Makefile.in: Regenerate
* include/debug/safe_base.h: Add _Safe_iterator_base _M_invalidate
and _M_reset. Add _Safe_sequence_base _M_attach, _M_attach_single,
_M_detach and _M_detach_single.
* include/debug.safe_iterator.h, safe_iterator.tcc: Remove
_Safe_iterator _M_invalidate and _M_invalidate_single. Implement all
methods in terms of normal iterators rather than safe ones.
* include/debug/safe_sequence.h: Replace _Safe_sequence
_M_transfe_iter with _M_transfer_from_if taking the source sequence
and a predicate signaling when a safe iterator shall be transfered.
Add _Equal_to predicate.
* include/debug/safe_sequence.tcc: New.
* include/Makefile.am: Adjust.
* include/Makefile.in: Regenerate.
* include/debug/forward_list: Swap safe iterators in move constructor.
Do not invalidate before begin in _M_invalidate_all method.
Reimplement safe methods using normal iterators rather than safe ones.
* include/debug/set.h, unordered_map, multiset.h, vector,
unordered_set, deque, map.h, list, multimap.h: Reimplement safe method
using normal iterators rather than safe ones.
* testsuite/23_containers/forward_list/debug/clear.cc, swap.cc,
move_constructor.cc, splice_after.cc, splice_after1.cc,
splice_after2.cc, splice_after3.cc, splice_after4.cc: New.
* testsuite/23_containers/vector/debug/multithreaded_swap.cc: New.
From-SVN: r167152
In gcc/objc/:
2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_build_struct): Install TYPE_OBJC_INTERFACE
after finish_struct, not before, otherwise it may be wiped out by
it. This fixes spurious warnings when a class has more than 15
instance variables.
In gcc/testsuite/:
2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/ivar-problem-1.m: New.
* obj-c++.dg/ivar-problem-1.mm: New.
From-SVN: r167151
PR middle-end/46637
* combine.c (try_combine): When substing i2dest for i2src, pass
1 as last argument even if
i0_feeds_i1_n && i1_feeds_i2_n && i0dest_in_i0src.
* gcc.c-torture/compile/pr46637.c: New test.
From-SVN: r167148
2010-11-25 Kai Tietz <kai.tietz@onevision.com>
* cgraphunit.c (process_function_and_variable_attributes):
Mark dllexport-ed function/variables as needed.
* ipa.c (cgraph_externally_visible_p): Make dllexport-ed
as externally visible.
2010-11-25 Kai Tietz <kai.tietz@onevision.com>
* gcc.dg/dll-8.c: New.
From-SVN: r167144
PR rtl-optimization/46585
* sel-sched-ir.c (return_regset_to_pool): Verify that RS is not NULL.
(vinsn_init): Skip initialization of dependencies for local NOPs.
(vinsn_delete): Don't try to free regsets for local NOPs.
(setup_nop_and_exit_insns): Change definition of nop_pattern.
testsuite:
* gcc.dg/pr46585.c: New.
From-SVN: r167141
2010-11-24 Richard Guenther <rguenther@suse.de>
PR lto/43218
* lto-symtab.c (lto_cgraph_replace_node): Mark edges with
conflicting function signatures as non-inlineable.
* gcc.dg/lto/20100423-1_0.c: Enable for all LTO modes.
From-SVN: r167122
PR rtl-optimization/46614
* sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP_P): Define.
(deps_analyze_insn): Mark JUMP_INSNs in
last_pending_memory_flush that weren't added through
flush_pending_lists with NON_FLUSH_JUMP_KIND.
(sched_analyze_2, sched_analyze_insn): Check NON_FLUSH_JUMP_P
on INSN_LIST instead of JUMP_P check on its operand.
* sched-rgn.c (concat_INSN_LIST): Copy over REG_NOTE_KIND.
* gcc.dg/pr46614.c: New test.
From-SVN: r167121
2010-11-24 Richard Guenther <rguenther@suse.de>
PR lto/46606
* lto-streamer-in.c (input_gimple_stmt): When we cannot find
a FIELD_DECL that is type correct issue a warning and fixup
with a VIEW_CONVERT_EXPR.
From-SVN: r167115
2010-11-24 Basile Starynkevitch <basile@starynkevitch.net>
* doc/invoke.texi (Options for Debugging Your Program or GCC):
Explain static numbering of dump files.
From-SVN: r167114
* common.opt (initial_max_fld_align, flag_debug_asm,
flag_dump_rtl_in_asm, flag_dump_all_passed, rtl_dump_and_exit,
flag_print_asm_name, graph_dump_format, help_printed,
help_columns, flag_opts_finished): New Variable entries.
(fdbg-cnt-list, fdbg-cnt=, fdebug-prefix-map=, frandom-seed,
frandom-seed=): Mark deferred.
(fsched-verbose=): Use UInteger and Var.
* flags.h (set_struct_debug_option, flag_print_asm_name,
rtl_dump_and_exit, flag_debug_asm, flag_dump_rtl_in_asm,
graph_dump_format): Don't declare here.
* haifa-sched.c (sched_verbose_param, fix_sched_param): Remove.
* opts-global.c: Include dbgcnt.h and debug.h.
(decode_options): Pass location to finish_options.
(handle_common_deferred_options): Check flag_dump_all_passed.
Handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list, OPT_fdebug_prefix_map_,
OPT_frandom_seed and OPT_frandom_seed_. Don't assert on
OPT_fstack_limit.
* opts.c: Don't include toplev.h, dbgcnt.h or debug.h.
(set_struct_debug_option): Add location_t parameter. Update
recursive call. Use error_at.
(default_options_optimization): Use error_at.
(finish_options): Add location_t parameter. Use
opts->x_flag_opts_finished instead of first_time_p. Use
opts->x_optimize instead of optimize. Use error_at. Pass
location to inform.
(print_filtered_help): Use opts->x_help_printed to track what
options have been printed.
(print_specific_help): Use opts->x_help_columns to track number of
columns.
(common_handle_option): Pass locations and gcc_options pointers to
more functions. Use warning_at instead of fnotice and warning.
Don't handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list or
OPT_fdebug_prefix_map_. Use error_at. Set
opts->x_initial_max_fld_align; don't set maximum_field_alignment.
Don't handle OPT_frandom_seed or OPT_frandom_seed_. Don't handle
OPT_fsched_verbose_.
(handle_param): Add location_r parameter. Use error_at.
(set_debug_level): Add location_r parameter. Use error_at and
warning_at.
(setup_core_dumping): Add diagnostic_context parameter.
(decode_d_option): Add gcc_options, location_t and
diagnostic_context parameters and use them instead of global
state. Use warning_at.
(enable_warning_as_error): Use error_at.
* opts.h (finish_options): Update prototype.
(set_struct_debug_option): Declare here.
* rtl.h (fix_sched_param): Remove.
* stor-layout.c (initial_max_fld_align): Remove.
* toplev.c (rtl_dump_and_exit, flag_print_asm_name,
graph_dump_format, flag_debug_asm, flag_dump_rtl_in_asm): Remove.
(process_options): Set maximum_field_alignment.
* tree.h (initial_max_fld_align) Don't declare here.
* Makefile.in (opts.o, opts-global.o): Update dependencies.
c-family:
* c-opts.c (c_common_handle_option): Pass location to
set_struct_debug_option.
testsuite:
* gcc.dg/opts-5.c: New test.
From-SVN: r167106
any already-instantiated declarations.
PR c++/46527
* gcc/cp/pt.c (instantiate_decl): Propagate the template's
location to its instance.
* gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C: New test.
From-SVN: r167104