1. 26 Apr, 2012 7 commits
  2. 25 Apr, 2012 33 commits
    • re PR libstdc++/52689 (static linking with libstdc++ fails) · 6d0f7cac
      2012-04-25  Benjamin Kosnik  <bkoz@redhat.com>
      
      	PR libstdc++/52689
      	* testsuite/17_intro/static.cc: Fix.
      	* testsuite/lib/dg-options.exp (dg-require-static-libstdcxx): New.
      
      From-SVN: r186845
      Benjamin Kosnik committed
    • re PR target/53120 (ICE exposing strict_low_part / in/out operand thinko -fno-tree-sra) · 8ca72b98
      	PR target/53120
      	* gcc.dg/torture/pr53120.c: New test.
      
      From-SVN: r186844
      Hans-Peter Nilsson committed
    • re PR target/53120 (ICE exposing strict_low_part / in/out operand thinko -fno-tree-sra) · d7173593
      	PR target/53120
      	* config/cris/cris.md ("*andhi_lowpart_v32")
      	("*andqi_lowpart_v32"): Change first input-only operand from
      	a (match_operand ...) to (match_dup 0).  Drop alternatives with
      	const_int-matching constraints for redundancy.
      	("*andhi_lowpart_non_v32", "*andqi_lowpart_non_v32"): Ditto.  Drop
      	three-operand alternative.
      
      From-SVN: r186843
      Hans-Peter Nilsson committed
    • re PR target/53110 (GCC-4.7 generates stupid x86_64 asm) · c1d40097
      	PR target/53110
      	* config/i386/i386.md (and<mode>3): For andq $0xffffffff, reg
      	instead expand it as zero extension.
      
      From-SVN: r186839
      Jakub Jelinek committed
    • Assert dbx_reg_number doesn't return INVALID_REGNUM · ff5f00c3
      	PR debug/52857
      	* dwarf2out.c (dbx_reg_number): Assert return value !=
      	INVALID_REGNUM.
      
      From-SVN: r186837
      H.J. Lu committed
    • scoped_allocator (scoped_allocator::__outermost): Do not pass non-POD to varargs function. · 862023d7
      	* include/std/scoped_allocator (scoped_allocator::__outermost): Do
      	not pass non-POD to varargs function.
      	* testsuite/20_util/scoped_allocator/1.cc: Fix test.
      
      From-SVN: r186836
      Jonathan Wakely committed
    • common.opt (flag_debug_types_section): Default to 0. · 98095aa3
      	* common.opt (flag_debug_types_section): Default to 0.
      	(dwarf_version): Default to 4.
      	(dwarf_record_gcc_switches): Default to 1.
      	(dwarf_strict): Default to 0.
      	* toplev.c (process_options): Don't handle dwarf_strict
      	or dwarf_version here.
      	* config/vxworks.c (vxworks_override_options): Don't
      	test whether dwarf_strict or dwarf_version are negative,
      	instead test !global_options_set.x_dwarf_*.
      	* config/darwin.c (darwin_override_options): Default to
      	dwarf_version 2.
      	* doc/invoke.texi: Note that -gdwarf-4, -grecord-gcc-switches
      	and -fno-debug-types-section are now the default.
      
      From-SVN: r186835
      Jakub Jelinek committed
    • cgraphunit.c: Update toplevel comment. · 9c8305f8
      
      	* cgraphunit.c: Update toplevel comment.
      	(tree_rest_of_compilation): Merge into cgraph_expand_function.
      	(cgraph_analyze_function): Make static.
      	(cgraph_decide_is_function_needed): Make static.
      	(cgraph_add_new_function): Use expand_function instead of
      	rest_of_compilation.
      	(clone_of_p, verify_edge_count_and_frequency, cgraph_debug_gimple_stmt,
      	verify_edge_corresponds_to_fndecl, verify_cgraph_node, verify_cgraph):
      	Move to cgraph.c
      	(cgraph_inline_p): Remove.
      	(cgraph_preserve_function_body_p): Move to ipa-inline-transform.
      	(init_cgraph): Add comment.
      	* cgraphbuild.c (record_reference, mark_address, mark_load,
      	mark_store): Do not call analyze_expr hook.
      	* cgraph.c: Update toplevel comment.
      	(clone_of_p, verify_edge_count_and_frequency, cgraph_debug_gimple_stmt,
      	verify_edge_corresponds_to_fndecl, verify_cgraph_node, verify_cgraph):
      	Move fere from cgraphunit.c
      	(cgraph_mark_force_output_node): Move to cgraph.h
      	* cgraph.h: Reorder so the comments match the function placement.
      	(cgraph_analyze_function, cgraph_decide_is_function_needed): Remove.
      	(cgraph_mark_force_output_node): Move here from cgraph.c
      	* tree.c (free_lang_data): Do not clear analyze_expr hook.
      	* ipa-inline-transform.c (preserve_function_body_p): New function.
      	(inline_transform): Update.
      	* langhooks.c (lhd_callgraph_analyze_expr): Remove.
      	* langhooks.h (lang_hooks_for_callgraph): Remove.
      	(lang_hooks): Remove callgraph.
      	* tree-inline.c (expand_call_inline): Do not use cgraph_inline_p.
      	* varpool.c: Remove out of date comment.
      	* langhooks-def.h (lhd_callgraph_analyze_expr): Remove.
      	(LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Remove.
      
      From-SVN: r186832
      Jan Hubicka committed
    • Update config.sub to 2012-04-18 version from official repo. · 95e5b9a4
      ChangeLog:
      
              * config.sub: Update to 2012-04-18 version from official repo.
      
      From-SVN: r186830
      Joel Brobecker committed
    • [multiple changes] · 03ad478d
      2012-04-25  Gary Dismukes  <dismukes@adacore.com>
      
      	* exp_ch9.adb: Add comments on the usage of the
      	lock-free data structures.
      
      2012-04-25  Vincent Pucci  <pucci@adacore.com>
      
      	* exp_intr.adb (Expand_Shift): Convert the left
      	operand and the operator when the type of the call differs from
      	the type of the operator.
      
      2012-04-25  Geert Bosch  <bosch@adacore.com>
      
      	* stand.ads: Minor comment fix.
      
      2012-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* sem_ch4.adb (Analyze_Slice): Handle the case where the prefix
      	is a string literal. Retrieve the first index from the base type
      	when slicing a string literal.
      	* sem_ch12.adb (Check_Private_View): Move the initialization
      	of the type inside the loop to reflect the changing index.
      	* sem_eval.adb (Eval_Relational_Op): Retrieve the first index
      	from the base type when dealing with a string literal.
      	* sem_res.adb (Resolve_Slice): Retrieve the first index from
      	the base type when slicing a string literal.
      	* sem_util.adb (Is_Internally_Generated_Renaming): New routine.
      	(Is_Object_Reference): String literals may act
      	as object references only when they are renamed internally.
      	(Proper_First_Index): New routine.
      	* sem_util.ads (Proper_First_Index): New routine.
      
      From-SVN: r186829
      Arnaud Charlet committed
    • [multiple changes] · 39ad1665
      2012-04-25  Robert Dewar  <dewar@adacore.com>
      
      	* sem_ch3.adb, csinfo.adb, lib-writ.adb, sem_ch12.adb,
      	lib-xref.adb: Minor reformatting.
      
      2012-04-25  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* exp_ch9.adb: Rename Lock_Free_Sub_Type
      	to Lock_Free_Subprogram. Remove type Subprogram_Id.
      	Rename LF_Sub_Table to Lock_Free_Subprogram_Table.
      	(Allow_Lock_Free_Implementation): Renamed to
      	Allows_Lock_Free_Implementation.  Update the comment on
      	lock-free restrictions. Code clean up and restructuring.
      	(Build_Lock_Free_Protected_Subprogram_Body): Update the
      	profile and related comments. Code clean up and restructuring.
      	(Build_Lock_Free_Unprotected_Subprogram_Body): Update the
      	profile and related comments. Code clean up and restructuring.
      	(Comp_Of): Removed.
      
      From-SVN: r186828
      Arnaud Charlet committed
    • [multiple changes] · d024b126
      2012-04-25  Vincent Celier  <celier@adacore.com>
      
      	* sem_ch12.adb (Inherit_Context): Compare library units, not
      	names of units, when checking if a unit is already in the context.
      
      2012-04-25  Thomas Quinot  <quinot@adacore.com>
      
      	* sem_ch3.adb: Reverse_Storage_Order must be propagated to
      	untagged derived record types.
      
      2012-04-25  Ed Schonberg  <schonberg@adacore.com>
      
      	* lib-xref.adb: Adjust position of end label.
      
      From-SVN: r186827
      Arnaud Charlet committed
    • re PR middle-end/53089 (gfortran.dg/coarray/atomic_1.f90 and gfortran.dg/coarray/registering_1.f90) · 838ff415
      	PR middle-end/53089 
      	* cgraphunit.c (referred_to_p): Move ahead in file to avoid forward declaration.
      	(cgraph_finalize_function): Finalize them here.
      	* symtab.c (dump_symtab): Dump ctors and dtors.
      
      From-SVN: r186820
      Jan Hubicka committed
    • re PR tree-optimization/52979 (likely wrong code bug w/packed bitfields) · f1cc9589
      	PR middle-end/52979
      	* stor-layout.c (get_best_mode): Don't return mode with bitsize
      	larger than maxbits.  Don't compute maxbits modulo align.
      	Also check that unit bytes long store at bitpos / unit * unit
      	doesn't affect bits beyond bitregion_end.
      	* expmed.c (store_bit_field_1): Avoid trying insv if OP_MODE MEM
      	would not fit into bitregion_start ... bitregion_end + 1 bit
      	region.
      	(store_split_bit_field): Decrease unit close to end of bitregion_end
      	if access is restricted in order to avoid mutual recursion.
      
      	* gcc.c-torture/compile/pr52979-1.c: New test.
      	* gcc.c-torture/execute/pr52979-1.c: New test.
      	* gcc.c-torture/execute/pr52979-2.c: New test.
      
      From-SVN: r186819
      Jakub Jelinek committed
    • l_fma_float_5.c: Adjust. · 948e73b3
      2012-04-25  Richard Guenther  <rguenther@suse.de>
      
      	* gcc.target/i386/l_fma_float_5.c: Adjust.
      	* gcc.target/i386/l_fma_double_4.c: Likewise.
      	* gcc.target/i386/l_fma_float_2.c: Likewise.
      	* gcc.target/i386/l_fma_float_6.c: Likewise.
      	* gcc.target/i386/l_fma_double_1.c: Likewise.
      	* gcc.target/i386/l_fma_double_5.c: Likewise.
      	* gcc.target/i386/l_fma_float_3.c: Likewise.
      	* gcc.target/i386/l_fma_double_2.c: Likewise.
      	* gcc.target/i386/l_fma_double_6.c: Likewise.
      	* gcc.target/i386/l_fma_float_4.c: Likewise.
      	* gcc.target/i386/l_fma_double_3.c: Likewise.
      	* gcc.target/i386/l_fma_float_1.c: Likewise.
      
      From-SVN: r186817
      Richard Guenther committed
    • re PR tree-optimization/53058 (Another ice in remove_range_assertions) · 0ea62d93
      	PR tree-optimization/53058
      	* double-int.h (double_int_max_value, double_int_min_value): New
      	prototypes.
      	* double-int.c (double_int_max_value, double_int_min_value): New
      	functions.
      	* tree-vrp.c (register_edge_assert_for_2): Compare mask
      	for LE_EXPR or GT_EXPR with double_int_max_value
      	instead of double_int_mask.
      
      	* gcc.c-torture/compile/pr53058.c: New test.
      
      From-SVN: r186816
      Jakub Jelinek committed
    • re PR middle-end/53088 (gcc.target/i386/pr39082-1.c) · 228f466f
      	PR middle-end/53088
      	* gcc.target/i386/pr39082-1.c: Update warning location.
      
      From-SVN: r186815
      Jan Hubicka committed
    • tree-vectorizer.h (vect_loop_versioning): Adjust prototype. · d68d56b5
      2012-04-25  Richard Guenther  <rguenther@suse.de>
      
      	* tree-vectorizer.h (vect_loop_versioning): Adjust prototype.
      	* tree-vect-loop.c (vect_transform_loop): Adjust.
      	* tree-vect-loop-manip.c (vect_do_peeling_for_loop_bound): Record
      	the maximum number of iterations for the epilogue loop.
      	(vect_loop_versioning): Remove case re-using the peeled
      	epilogue loop.
      
      From-SVN: r186813
      Richard Guenther committed
    • re PR c/52880 (-Woverride-init emitts unexpected error) · fdce1719
      	PR c/52880
      	* c-typeck.c (set_nonincremental_init,
      	set_nonincremental_init_from_string): Pass true instead of false
      	as IMPLICIT to add_pending_init.
      
      	* gcc.dg/pr52880.c: New test.
      
      From-SVN: r186808
      Jakub Jelinek committed
    • c-typeck.c (pop_init_level): Improve diagnostics. · 32397f22
      2012-04-25  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	* c-typeck.c (pop_init_level): Improve diagnostics.
      testsuite/
      	* gcc.dg/m-un-2.c: Update.
      	* gcc.dg/20011021-1.c: Update.
      
      From-SVN: r186807
      Manuel López-Ibáñez committed
    • re PR fortran/52196 (Add -Wrealloc-lhs) · f1fb11f1
      2012-04-25  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/52196
              * lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
              * gfortran.h (gfc_option_t): Add them.
              * options.c (gfc_init_options, gfc_post_options,
              gfc_handle_option): Handle them.
              * invoke.texi: Document them.
              * trans-expr.c (realloc_lhs_warning): New function.
              (gfc_trans_arrayfunc_assign,
              alloc_scalar_allocatable_for_assignment,
              gfc_trans_assignment_1): Use it.
      
      2012-04-25  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/52196
              * gfortran.dg/realloc_on_assign_14.f90: New.
      
      From-SVN: r186806
      Tobias Burnus committed
    • compare-elim.c (try_eliminate_compare): Also handle operands with implicit extensions. · ad1d9a50
      	* compare-elim.c (try_eliminate_compare): Also handle operands with
      	implicit extensions.
      
      From-SVN: r186805
      Uros Bizjak committed
    • re PR go/52341 (crypto/rand FAILs before Solaris 11) · 2b210b6f
      	PR go/52341
      
      crypto/rand: Use io.ReadFull when reading from /dev/urandom.
      
      From-SVN: r186803
      Ian Lance Taylor committed
    • re PR go/52583 (Several new go testsuite failues on Solaris) · b685de12
      	PR go/52583
      
      net: Solaris fixes.
      
      In particular fix fd_select.go to handle the case where a file
      descriptor is closed by one goroutine while another goroutine
      is waiting for it.
      
      From-SVN: r186801
      Ian Lance Taylor committed
    • rs6000 (SAVE_INLINE_VRS, [...]): Define. · b427dd7a
      gcc/
      	* config/rs6000/rs6000 (SAVE_INLINE_VRS, REST_INLINE_VRS,
      	V_SAVE_INLINE, SAVRES_LR, SAVRES_SAVE, SAVRES_REG,
      	SAVRES_GPR, SAVRES_FPR, SAVRES_VR): Define.
      	(no_global_regs_above): Delete.
      	(no_global_regs): New function.
      	(rs6000_savres_strategy): Handle vector regs.  Use proper lr_save_p
      	value for load multiple test.
      	(savres_routine_syms): Increase size.
      	(rs6000_savres_routine_name, rs6000_savres_routine_sym,
      	ptr_regno_for_savres, rs6000_emit_savres_rtx): Pass in int selector
      	rather than a number of boolean flags.  Update all callers.
      	(rs6000_savres_routine_name): Generate vector save/restore names.
      	(rs6000_savres_routine_sym): Handle vector regs.  Delete forward decl.
      	(ptr_regno_for_savres, rs6000_emit_savres_rtx): Likewise.
      	(rs6000_emit_prologue): Delete saving_FPRs_inline, saving_GPRs_inline
      	and using_store_multiple.  Expand uses.  Don't always use r11 as
      	frame reg when needed for out-of-line saves.  Set up initial offset
      	for out-of-line vector saves when buying stack frame.  Handle pointer
      	reg setup for out-of-line fp save.  Emit call to out-of-line vector
      	save function.  Choose r11 or r12 for vrsave reg when available for
      	better scheduling.
      	(rs6000_output_function_prologue): Don't emit .extern for ELF.
      	(rs6000_emit_epilogue): Choose a better frame reg when restoring
      	from back-chain to suit out-of-line vector restore functions.  Emit
      	call to out-of-line vector restore function.  Adjust register used
      	for cr restore.  Tweak pointer register setup for gpr restore.
      	* config/rs6000/rs6000.h (FIRST_SAVED_GP_REGNO): Take into account
      	FIXED_R13.
      	* config/rs6000/sysv4.h (FP_SAVE_INLINE, GP_SAVE_INLINE): Simplify.
      	(V_SAVE_INLINE): Define.
      	* config/rs6000/altivec.md (save_vregs_*, restore_vregs_*): New insns.
      libgcc/
      	* config/rs6000/crtsavevr.S: New file.
      	* config/rs6000/crtrestvr.S: New file.
      	* config/rs6000/t-savresfgpr: Build the above.
      	* config/rs6000/t-netbsd: Likewise.
      
      From-SVN: r186800
      Alan Modra committed
    • rs6000.c (rs6000_savres_strategy): Allow out-of-line save/restore for large frames. · 1bf7c2a7
      	* config/rs6000/rs6000.c (rs6000_savres_strategy): Allow
      	out-of-line save/restore for large frames.  Don't disable
      	out-of-line saves on ABI_AIX when using static chain reg.
      	(rs6000_emit_prologue): Adjust cr_save_regno on ABI_AIX to not
      	clobber static chain reg, and tweak for out-of-line gpr saves
      	that use r1.
      
      From-SVN: r186799
      Alan Modra committed
    • rs6000.c (START_USE, [...]): Define. · c344e265
      	* config/rs6000/rs6000.c (START_USE, END_USE, NOT_INUSE): Define.
      	(rs6000_emit_prologue): Use the above to catch register overlap.
      
      From-SVN: r186798
      Alan Modra committed
    • rs6000.c (rs6000_emit_stack_reset): Delete forward decl. · 544055ae
      	* config/rs6000/rs6000.c (rs6000_emit_stack_reset): Delete forward
      	decl.  Move logic selecting update reg to callers.  Update all callers.
      	(rs6000_emit_allocate_stack): Add copy_off param.
      	(emit_frame_save): Don't handle reg+reg addressing.
      	(ptr_regno_for_savres): New function, extracted from..
      	(rs6000_emit_savres_rtx): ..here.  Add lr_offset param.
      	(rs6000_emit_prologue): Generate frame_ptr_rtx as we need it.
      	Set frame_reg_rtx to r11 whenever r11 is needed, and merge
      	frame offset adjustment for out-of-line save with copy from sp.
      	Simplify condition controlling whether cr is saved early or
      	late.  Use ptr_regno_for_savres to verify correct reg is set
      	up for out-of-line saves.  Pass the actual pointer reg used to
      	rs6000_emit_savres_rtx so rtl matches insns in out-of-line
      	function.  Rearrange spe vars so code is similar to that
      	elsewhere in this function.  Don't update frame_off when spe
      	save code will restore r11.  Use emit_frame_save for spe and
      	gpr saves.  Consolidate darwin out-of-line gpr setup with that
      	for other abis.  Don't assume frame_offset is zero and frame
      	reg is sp when setting up altivec reg saves, and calculate
      	exact offset requirement.
      	(rs6000_emit_epilogue): Use HOST_WIDE_INT for frame_off.  Tidy
      	spe restore code.  Consolidate darwin out-of-line gpr setup
      	with that for other abis.
      
      From-SVN: r186797
      Alan Modra committed
    • rs6000.c (rs6000_frame_related): Don't emit a REG_FRAME_RELATED_EXPR note when... · 471df90f
      	* config/rs6000/rs6000.c (rs6000_frame_related): Don't emit a
      	REG_FRAME_RELATED_EXPR note when the instruction exactly matches
      	the replacement.
      	(emit_frame_save): Delete frame_ptr param.  Rename total_size to
      	frame_reg_to_sp.
      	(rs6000_emit_prologue): Add sp_off.  Update rs6000_frame_related
      	and emit_frame_save calls.  Cope with possibly missing note.
      
      From-SVN: r186796
      Alan Modra committed
    • i386-cpuinfo.c: Set __cpu_vendor always. · ad491329
      2012-04-24  Sriraman Tallam  <tmsriram@google.com>
      
      	* libgcc/config/i386/i386-cpuinfo.c: Set __cpu_vendor always.
      
      From-SVN: r186795
      Sriraman Tallam committed
    • re PR libstdc++/52689 (static linking with libstdc++ fails) · 3b34ddb8
      2012-04-24  Benjamin Kosnik  <bkoz@redhat.com>
      
      	PR libstdc++/52689
      	* testsuite/17_intro/static.cc: New.
      
      From-SVN: r186794
      Benjamin Kosnik committed
    • Daily bump. · 6e58c9ab
      From-SVN: r186793
      GCC Administrator committed
    • This patch adds new builtins to check for cpu type and features. · 792317cc
      2012-04-24  Sriraman Tallam  <tmsriram@google.com>
      
      This patch adds new builtins to check for cpu type and features. 
      
      * __builtin_cpu_is ("<CPUNAME>")
      * __builtin_cpu_supports ("<FEATURE>")
      
      apart from the cpu init builtin, __builtin_cpu_init.
      
      List of CPU names :
      
      * "amd"
      * "intel"
      * "atom"
      * "core2"
      * "corei7"
      * "nehalem"
      * "westmere"
      * "sandybridge"
      * "amdfam10h"
      * "barcelona"
      * "shanghai"
      * "istanbul"
      * "bdver1"
      * "bdver2"
      
      List of CPU features :
      
      * "cmov"
      * "mmx"
      * "popcnt"
      * "sse"
      * "sse2"
      * "sse3"
      * "ssse3"
      * "sse4.1"
      * "sse4.2"
      * "avx"
      
              * config/i386/i386.c (build_processor_model_struct): New function.
              (make_var_decl): New function.
              (fold_builtin_cpu): New function.
              (ix86_fold_builtin): New function.
              (make_cpu_type_builtin): New function.
              (ix86_init_platform_type_builtins): New function.
              (ix86_expand_builtin): Expand new builtins by folding them.
              (ix86_init_builtins): Make new builtins to detect CPU type.
              (TARGET_FOLD_BUILTIN): New macro.
              (IX86_BUILTIN_CPU_INIT): New enum value.
              (IX86_BUILTIN_CPU_IS): New enum value.
              (IX86_BUILTIN_CPU_SUPPORTS): New enum value.
              * config/i386/i386-builtin-types.def: New function type.
              * testsuite/gcc.target/builtin_target.c: New testcase.
              * doc/extend.texi: Document builtins.
      
              * libgcc/config/i386/i386-cpuinfo.c: New file.
              * libgcc/config/i386/t-cpuinfo: New file.
              * libgcc/config.host: Include t-cpuinfo.
              * libgcc/config/i386/libgcc-glibc.ver: Version symbol __cpu_model.
      
      From-SVN: r186789
      Sriraman Tallam committed