Nicola Pero [Sat, 27 Nov 2010 09:53:43 +0000 (09:53 +0000)]
In gcc/objc/: 2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_build_struct): Fixed loops that save and
restore TYPE_OBJC_INFO to iterate over all variants of the type; a
special case for the current type is then no longer required.
Duplicate TYPE_LANG_SPECIFIC for each type before restoring
TYPE_OBJC_INFO.
(objc_get_protocol_qualified_type): Updated comments.
In gcc/testsuite/:
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
Rainer Orth [Fri, 26 Nov 2010 17:36:42 +0000 (17:36 +0000)]
gnat.exp: Load gcc.exp.
* lib/gnat.exp: Load gcc.exp.
(gnat_target_compile): Use gcc_target_compile for *.c sources.
* gnat.dg/sse_nolib.adb: Use dg-require-effective-target sse_runtime.
Richard Guenther [Fri, 26 Nov 2010 16:12:49 +0000 (16:12 +0000)]
re PR lto/46648 (type mismatch in array reference; verify_stmts failed)
2010-11-26 Richard Guenther <rguenther@suse.de>
PR lto/46648
* gimple.c (gtc_visit): Do not return true for members of an
SCC still being processed but the current lattice value of
the member. Treat SCC members comparison state as lattice,
starting at equal, eventually dropping to unequal.
(gimple_types_compatible_p_1): Likewise.
* gcc.dg/lto/20101125-1_0.c: New testcase.
* gcc.dg/lto/20101125-1_1.c: Likewise.
re PR target/33637 ("checking for nm: test: too many arguments" causes "Undefined symbol: __gxx_personality_v0")
PR target/33637
* configure.ac: Accept extra arguments for AS_FOR_TARGET,
LD_FOR_TARGET, NM_FOR_TARGET, OBJDUMP_FOR_TARGET.
* configure: Regenerated.
* exec-tool.in: Not quoting command, may have extra arguments.
Jakub Jelinek [Fri, 26 Nov 2010 09:38:54 +0000 (10:38 +0100)]
re PR middle-end/46647 (Can't inline memset with -1)
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.
pa.md (negdf2): Condition on !flag_signed_zeros instead of flag_unsafe_math_optimizations.
* 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.
Janus Weil [Thu, 25 Nov 2010 22:04:59 +0000 (23:04 +0100)]
re PR fortran/46581 ([OOP] segfault in SELECT TYPE with associate-name)
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.
François Dumont [Thu, 25 Nov 2010 20:53:39 +0000 (21:53 +0100)]
debug.cc: Introduce a mutex pool in get_safe_base_mutex.
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.
Nicola Pero [Thu, 25 Nov 2010 19:50:13 +0000 (19:50 +0000)]
In gcc/objc/: 2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com>
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>
* gengtype.c (type count): New variable.
(new_structure, find_param_structure, create_pointer)
(create_array): Use it to set state_number in types.
(dump_everything): Improve comment.
(main): Call read_state and write_state. Print type_count.
* gengtype.h (type_lineloc): New function.
(read_state, write_state): New declarations.
* Makefile.in (GENGTYPE_FLAGS): New variable.
(s-gtype): Run gengtype twice and generate gtype.state.
(build/gengtype-state.o): New rule.
(build/gengtype$(build_exeext)): Link gengtype-state.o.
(mostlyclean): Update comment. Remove gtype.state.
Jakub Jelinek [Thu, 25 Nov 2010 18:00:47 +0000 (19:00 +0100)]
re PR middle-end/46637 (SIGSEGV in if_then_else_cond - too deep recursion)
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.
Kai Tietz [Thu, 25 Nov 2010 12:30:07 +0000 (12:30 +0000)]
cgraphunit.c (process_function_and_variable_attributes): Mark dllexport-ed function/variables as needed.
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.
re PR rtl-optimization/46585 (ICE: SIGSEGV in vinsn_create (sel-sched-ir.c:1189) with -fno-dce -fschedule-insns -fselective-scheduling)
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.
H.J. Lu [Wed, 24 Nov 2010 18:24:39 +0000 (18:24 +0000)]
Improve vzeroupper optimization.
gcc/
2010-11-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/46519
* config/i386/i386.c (upper_128bits_state): New.
(block_info_def): Remove upper_128bits_set and done. Add state,
referenced, count, processed and rescanned.
(check_avx256_stores): Updated.
(move_or_delete_vzeroupper_2): Updated. Handle deleted BB_END.
Call note_stores only if needed. Set referenced and count.
(move_or_delete_vzeroupper_1): Updated. Set rescan_vzeroupper_p.
(rescan_move_or_delete_vzeroupper): New.
(move_or_delete_vzeroupper): Process and rescan all all basic
blocks instead of predecessor blocks of all exit points.
(ix86_option_override_internal): Enable vzeroupper optimization
only for -fexpensive-optimizations and not optimizing for size.
(use_avx256_p): Removed.
(init_cumulative_args): Don't set use_avx256_p.
(ix86_function_arg): Likewise.
(ix86_expand_move): Likewise.
(ix86_expand_vector_move_misalign): Likewise.
(ix86_local_alignment): Likewise.
(ix86_minimum_alignment): Likewise.
(ix86_expand_epilogue): Don't check use_avx256_p when generating
vzeroupper.
(ix86_expand_call): Likewise.
* config/i386/i386.h (machine_function): Remove use_vzeroupper_p
and use_avx256_p. Add rescan_vzeroupper_p.
gcc/testsuite/
2010-11-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/46519
* gcc.target/i386/avx-vzeroupper-10.c: Expect no avx_vzeroupper.
* gcc.target/i386/avx-vzeroupper-11.c: Likewise.
Jakub Jelinek [Wed, 24 Nov 2010 16:56:44 +0000 (17:56 +0100)]
re PR rtl-optimization/46614 (gcc.dg/vect/vect-strided-u8-i8-gap4.c FAILs with -fno-rename-registers -fsched2-use-superblocks)
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.
Richard Guenther [Wed, 24 Nov 2010 14:00:43 +0000 (14:00 +0000)]
re PR lto/46606 (ICE in input_gimple_stmt in lto1)
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.
Joseph Myers [Wed, 24 Nov 2010 13:28:38 +0000 (13:28 +0000)]
common.opt (user_vect_verbosity_level): New Variable entry.
* common.opt (user_vect_verbosity_level): New Variable entry.
(ftree-vectorizer-verbose=): Mark as UInteger.
* flag-types.h (enum vect_verbosity_levels): Move from enum
verbosity_levels in tree-vectorizer.h.
* opts.c: Don't include tree.h.
(vect_set_verbosity_level): Move from tree-vectorizer.c. Use
gcc_options parameter; take integer option argument.
(common_handle_option): Update call to vect_set_verbosity_level.
* tree-vectorizer.c (user_vect_verbosity_level): Remove.
(vect_set_verbosity_level): Move to opts.c.
(vect_verbosity_level, vect_print_dump_info): Update for change of
enum name.
* tree-vectorizer.h (enum verbosity_levels): Move to flag-types.h.
(vect_print_dump_info): Update for change of enum name.
* tree.h (vect_set_verbosity_level): Remove.
* Makefile.in (opts.o): Update dependencies.
Joseph Myers [Wed, 24 Nov 2010 00:54:26 +0000 (00:54 +0000)]
common.opt (initial_max_fld_align, [...]): New Variable entries.
* 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.
Jeffrey Yasskin [Wed, 24 Nov 2010 00:24:54 +0000 (00:24 +0000)]
Propagate the source location from a template function's definition to
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.
Dave Korn [Tue, 23 Nov 2010 19:18:39 +0000 (19:18 +0000)]
re PR driver/42690 (Undefined reference errors with -flto -fuse-linker-plugin)
PR driver/42690
* gcc.c (LINK_COMMAND_SPEC): Remove hard-coded pass-through plugin
options, replace by call of pass-through-libs spec function to process
link_gcc_c_sequence spec.
(lto_libgcc_spec): Delete variable.
(static_specs[]): Remove related entry.
(static_spec_functions[]): Add new entry for pass-through-libs.
(main): Don't generate deleted lto_libgcc_spec.
(pass_through_libs_spec_func): New function to implement the new
pass-through-libs spec function.
* doc/invoke.texi (pass-through-libs): Document new spec function.
Nicola Pero [Tue, 23 Nov 2010 09:47:07 +0000 (09:47 +0000)]
In gcc/objc/: 2010-11-23 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-23 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/24358
* lang-specs.h: Added objective-c-cpp-output. Mapped .mi to
objective-c-cpp-output instead of objc-cpp-output. Print a
deprecation note every time objc-cpp-output is requested.
In gcc/objcp/:
2010-11-23 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/24358
* lang-specs.h: Print a deprecation note every time
objc++-cpp-output is requested.
Richard Guenther [Tue, 23 Nov 2010 09:42:41 +0000 (09:42 +0000)]
tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid doing work twice.
2010-11-23 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid doing work
twice. Avoid re-allocating the ops vector all the time.
2010-11-23 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (refs_may_alias_p_1): Avoid calls to
is_gimple_min_invariant, group tree code checks to allow
combining them.
(stmt_may_clobber_ref_p_1): Check for SSA_NAME instead
of is_gimple_reg.
Joseph Myers [Mon, 22 Nov 2010 23:59:18 +0000 (23:59 +0000)]
common.opt (exit_after_options, [...]): New Variable entries.
* common.opt (exit_after_options, write_symbols, debug_info_level,
use_gnu_debug_info_extensions): New Variable entries.
(fprofile-dir=): Use Var.
* flag-types.h (enum debug_info_level): Rename to enum
debug_info_levels.
* flags.h (write_symbols, debug_info_level,
use_gnu_debug_info_extensions): Remove declarations.
* opts.c (exit_after_options, write_symbols, debug_info_level):
Remove.
(set_struct_debug_option): Make static variables const.
(use_gnu_debug_info_extensions): Remove.
(set_debug_level, print_filtered_help, print_specific_help,
fast_math_flags_set_p): Take gcc_options parameters and use them
in place of global variables.
(print_filtered_help): Make new_help non-static.
(print_specific_help): Update call to print_filtered_help.
(common_handle_option): Update calls to print_specific_help. Use
gcc_options structure for more settings. Make --help table
const. Don't handle OPT_fprofile_dir_ here. Update calls to
set_debug_level.
* toplev.c (profile_data_prefix): Remove.
* toplev.h (profile_data_prefix, exit_after_options): Remove
declarations.
(fast_math_flags_set_p): Update prototype.
* cppbuiltin.c (define_builtin_macros_for_compilation_flags):
Update call to fast_math_flags_set_p.
* lib/target-supports.exp (check_vect_support_and_set_flags): New
procedure to check if the target supports vectorizer tests. Set
DEFAULT_VECTCFLAGS and dg-do-what-default depending on vectorization
capabilites.
* gcc.dg/vect/vect.exp: Use check_vect_support_and_set_flags.
* g++.dg/vect/vect.exp: Ditto.
* gfortran.dg/vect/vect.exp: Ditto.