* config/rs6000/rs6000.md (fix_trunc<SFDF>si2_stfiwx): Use
nonimmediate_operand for the destination.
(fixuns_trunc<SFDF>si2_stfiwx): Likewise.
From-SVN: r181324
* builtins.c (expand_builtin_compare_and_swap): If target is const0,
don't pass the target to expand_atomic_compare_and_swap.
(expand_builtin_atomic_compare_exchange): Likewise.
From-SVN: r181323
PR libstdc++/51083
* include/ext/type_traits.h (__promote): Only define __type member
for integral and floating point types, to prevent math functions
participating in overload resolution for other types.
(__promote_2, __promote_3, __promote_4): Use __promote in default
template argument values, so deduction only succeeds for integral and
floating point types.
* testsuite/26_numerics/cmath/51083.cc: New.
* testsuite/26_numerics/complex/51083.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
* testsuite/tr1/8_c_compatibility/complex/51083.cc: New.
From-SVN: r181321
ada:
* gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
s-oscons.ads.
(OSCONS_CPP, OSCONS_EXTRACT): New.
(./bldtools/oscons/xoscons): New Target.
($(RTSDIR)/s-oscons.ads): New Target.
(gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
* gcc-interface/Make-lang.in (ada/s-oscons.ads) Remove as dependency.
* Make-generated.in: Remove machinery to generate xoscons and
ada/s-oscons.ads.
libada:
Makefile.in: Change dependency on oscons to depend on the generator
tool.
From-SVN: r181319
gcc/testsuite:
PR testsuite/51059
* gcc.misc-tests/gcov-14.c (dg-options): Force flat namespace for
Darwin targets and allow external symbols to be undefined.
From-SVN: r181317
gcc:
PR target/45233
* config/rs6000/rs6000.c (rs6000_legitimize_reload_address):
Only expand a symbol ref. into an access when the entity is defined
in the TU.
From-SVN: r181315
* config/i386/i386-protos.h (ix86_maybe_emit_epilogue_vzeroupper):
New prototype.
* config/i386/i386.c (ix86_maybe_emit_epilogue_vzeroupper): New
function.
(ix86_expand_epilogue): Use it.
* config/i386/i386.md (return, simple_return): Call it in the
expanders.
From-SVN: r181300
PR tree-optimization/51058
* tree-vect-slp.c (vect_remove_slp_scalar_calls): New function.
(vect_schedule_slp): Call it.
* tree-vect-stmts.c (vectorizable_call): If slp_node != NULL,
don't replace scalar calls with setting of their lhs to zero here.
* gcc.dg/vect/fast-math-vect-call-1.c: Add f4 test.
* gfortran.dg/vect/pr51058-2.f90: New test.
From-SVN: r181298
PR c++/50976
* typeck.c (check_literal_operator_args): Reorganize test for string
operators so size_t search depends on finding string first.
From-SVN: r181292
* tree-vect-slp.c (vect_free_slp_tree): Also free SLP_TREE_CHILDREN
vector.
(vect_create_new_slp_node): Don't allocate node before checking stmt
type.
(vect_free_oprnd_info): Remove FREE_DEF_STMTS argument, always
free def_stmts vectors and additionally free oprnd_info.
(vect_build_slp_tree): Adjust callers. Call it even if
stop_recursion. If vect_create_new_slp_node or
vect_build_slp_tree fails, properly handle freeing memory.
If it succeeded, clear def_stmts in oprnd_info.
From-SVN: r181281
* final.c, output.h (fprint_whex, fprint_w, fprint_ul, sprint_ul):
New functions serving as fast replacements for fprintf() integer
to string conversions. They were used in the following changes.
* final.c (sprint_ul_rev): Internal helper for the above.
(output_addr_const): case CONST_INT: don't use fprintf().
* elfos.h (ASM_GENERATE_INTERNAL_LABEL): Don't use sprintf("%u"),
use sprint_ul() and stpcpy() which are much faster.
(TARGET_ASM_INTERNAL_LABEL): Define as default_elf_internal_label.
(ELF_ASCII_ESCAPES, ELF_STRING_LIMIT): Are the old ESCAPES and
STRING_LIMIT macros.
(ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII): Macros now just
call respective functions that provide the same
functionality. Those are default_elf_asm_output_limited_string()
and default_elf_asm_output_ascii() in varasm.c.
* varasm.c: Fixed some whitespace inconsistencies.
(default_elf_asm_output_limited_string)
(default_elf_asm_output_ascii): The above macros from elfos.h are
implemented here as these functions, avoiding superfluous calls to
fprintf().
(default_elf_internal_label): Hook for
targetm.asm_out.internal_label and ASM_OUTPUT_DEBUG_LABEL.
* i386.c: Don't call fprintf("%u") but fprint_ul() instead.
* defaults.h (ASM_OUTPUT_LABEL, ASM_OUTPUT_INTERNAL_LABEL):
Expanded the macros on multiple lines for readability.
(ASM_OUTPUT_LABELREF): Have two calls to fputs() instead of one to
asm_fprintf().
* dwarf2asm.c (dw2_assemble_integer, dw2_asm_output_data)
(dw2_asm_data_uleb128, dw2_asm_delta_uleb128)
(dw2_asm_delta_sleb128): Convert fprintf() calls to the new
faster functions.
* dwarf2out.c (dwarf2out_source_line): Convert fprintf() calls to
the new faster functions.
From-SVN: r181279
PR c++/50973
* decl2.c (mark_used): Defer synthesis of virtual functions.
* method.c (use_thunk): Make sure the target function has
DECL_INTERFACE_KNOWN.
From-SVN: r181272
* fe.h (Serious_Errors_Detected): New macro.
* gcc-interface/gigi.h (build_atomic_load): Declare.
(build_atomic_store): Likewise.
* gcc-interface/trans.c (atomic_sync_required_p): New predicate.
(call_to_gnu): Add ATOMIC_SYNC parameter. Use local variable.
Build an atomic load for an In or In Out parameter if needed.
Build an atomic store for the assignment of an Out parameter if needed.
Build an atomic store to the target if ATOMIC_SYNC is true.
(present_in_lhs_or_actual_p): New predicate.
(gnat_to_gnu) <N_Identifier>: Build an atomic load if needed.
<N_Explicit_Dereference>: Likewise.
<N_Indexed_Component>: Likewise.
<N_Selected_Component>: Likewise.
<N_Assignment_Statement>: Adjust call to call_to_gnu.
Build an atomic store to the LHS if needed.
<N_Function_Call>: Adjust call to call_to_gnu.
* gcc-interface/utils2.c: Include toplev.h.
(resolve_atomic_size): New static function.
(build_atomic_load): New function.
(build_atomic_store): Likewise.
* gcc-interface/Make-lang.in (ada/utils2.o): Add toplev.h.
From-SVN: r181267
* gcov.c (struct function_info): Make src an index, not a pointer.
(struct source_info): Remove index and next source fields.
(fn_end): New static var.
(sources_index): Remove.
(sources): Now a pointer to an array, not a list.
(n_sources, a_sources): New.
(process_file): Adjust for changes to read_graph_file. Insert
functions into source lists and check line numbers here.
(generate_results): Only allocate lines for sources with
contents. Adjust for source array.
(release_structures): Likewise.
(find_source): Return source index, adjust for source array.
(read_graph_file): Return function list. Don't insert into source
lists here.
(read_count_file): Take list of functions.
(solve_flow_graph): Reverse the arc lists here.
(add_line_counts): Adjust for source array.
From-SVN: r181265
PR middle-end/51077
* tree-object-size.c (addr_object_size): Check TREE_CODE of
MEM_REF's operand rather than code of the MEM_REF itself.
* gcc.c-torture/compile/pr51077.c: New test.
From-SVN: r181263