1. 16 Jun, 2017 2 commits
    • PR c++/80560 - warn on undefined memory operations involving non-trivial types · c3684b7b
      gcc/c-family/ChangeLog:
      
      	PR c++/80560
      	* c.opt (-Wclass-memaccess): New option.
      
      gcc/cp/ChangeLog:
      
      	PR c++/80560
      	* call.c (first_non_public_field, maybe_warn_class_memaccess): New
      	functions.
      	(has_trivial_copy_assign_p, has_trivial_copy_p): Ditto.
      	(build_cxx_call): Call maybe_warn_class_memaccess.
      
      gcc/ChangeLog:
      
      	PR c++/80560
      	* dumpfile.c (dump_register): Avoid calling memset to initialize
      	a class with a default ctor.
      	* gcc.c (struct compiler): Remove const qualification.
      	* genattrtab.c (gen_insn_reserv): Replace memset with initialization.
      	* hash-table.h: Ditto.
      	* ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
      	  assignment.
      	* ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
      	* omp-low.c (lower_omp_ordered_clauses): Replace memset with
      	default ctor.
      	* params.h (struct param_info): Make struct members non-const.
      	* tree-switch-conversion.c (emit_case_bit_tests): Replace memset
      	with default initialization.
      	* vec.h (vec_copy_construct, vec_default_construct): New helper
      	functions.
      	(vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
      	with vec_copy_construct.
      	(vect<T>::quick_grow_cleared): Replace memset with default ctor.
      	(vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
      	* doc/invoke.texi (-Wclass-memaccess): Document.
      
      libcpp/ChangeLog:
      
      	PR c++/80560
      	* line-map.c (line_maps::~line_maps): Avoid calling htab_delete
      	with a null pointer.
      	(linemap_init): Avoid calling memset on an object of a non-trivial
      	type.
      
      libitm/ChangeLog:
      
      	PR c++/80560
      	* beginend.cc (GTM::gtm_thread::rollback): Avoid calling memset
      	on an object of a non-trivial type.
      	(GTM::gtm_transaction_cp::commit): Use assignment instead of memcpy
      	to copy an object.
      	* method-ml.cc (orec_iterator::reinit): Avoid -Wclass-memaccess.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/80560
      	* g++.dg/Wclass-memaccess.C: New test.
      
      From-SVN: r249234
      Martin Sebor committed
    • Daily bump. · 6a382041
      From-SVN: r249233
      GCC Administrator committed
  2. 15 Jun, 2017 13 commits
    • re PR ada/81105 (system-freebsd-x86.ads renamed but referenced by… · cb55f77d
      re PR ada/81105 (system-freebsd-x86.ads renamed but referenced by gcc/ada/gcc-interface/Makefile.in)
      
      	PR ada/81105
      	* gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
      	(i[3456]86-pc-gnu): Likewise.
      	(x86_64 kfreebsd): Likewise.
      
      From-SVN: r249228
      Nicolas Boulenguez committed
    • re PR fortran/80983 ([F03] memory leak when calling procedure-pointer component… · d0e7a9fd
      re PR fortran/80983 ([F03] memory leak when calling procedure-pointer component with allocatable result)
      
      2017-06-15  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/80983
      	* trans-expr.c (gfc_conv_procedure_call): Deallocate the result of
      	scalar allocatable procedure-pointer components.
      
      
      2017-06-15  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/80983
      	* gfortran.dg/proc_ptr_comp_51.f90: New test.
      
      From-SVN: r249227
      Janus Weil committed
    • 2017-06-15 François Dumont <fdumont@gcc.gnu.org> · 0356a074
      	* src/c++98/tree.cc  [!_GLIBCXX_INLINE_VERSION]
      	(_Rb_tree_rotate_left, _Rb_tree_rotate_right): Delete.
      
      From-SVN: r249226
      François Dumont committed
    • Revert accidental checkin. · 3a849280
      From-SVN: r249225
      Jan Hubicka committed
    • re PR lto/69866 (lto1: internal compiler error: in add_symbol_to_partition_1, at… · d1eed638
      re PR lto/69866 (lto1: internal compiler error: in add_symbol_to_partition_1, at lto/lto-partition.c:158)
      
      
      	PR lto/69866
      	* lto-symtab.c (lto_symtab_merge_symbols): Drop useless definitions
      	that resolved externally.
      
      	* gcc.dg/lto/pr69866_0.c: New test.
      	* gcc.dg/lto/pr69866_1.c: Likewise.
      
      From-SVN: r249224
      Jan Hubicka committed
    • Update comment about is_leaf · 55dabf65
      crtl->is_leaf has a comment above it referring to "Local Register
      Allocation". However this is set by IRA and not LRA since the meaning
      of Local Register Allocator in GCC has changed quite drastically since
      1999 when this comment was introduced above the variable
      current_function_is_leaf. From memory gcc in those days had "local"
      and "global" register allocation - however all of this has changed
      quite a bit drastically since.
      
      This patch merely updates the comment as I did some head scratching
      this morning about how this could be set before Local Register
      Allocator especially given the comment in ira.c as below.
      
      
       /* Determine if the current function is a leaf before running IRA
           since this can impact optimizations done by the prologue and
           epilogue thus changing register elimination offsets.  */
        crtl->is_leaf = leaf_function_p ();
      
      From-SVN: r249223
      Ramana Radhakrishnan committed
    • Fix problems with the MSP430 port's handling of persistent data. · 61f5d852
      	PR target/78818
      gcc	* config/msp430/msp430.c (msp430_data_attr): Check that it's possible
      	for a variable to have a section before checking if the section has a
      	name.
      	Set section to.persistent if persistent	attribute is set.
      	Warn if .persistent attribute is used on an automatic variable.
      
      tests	* gcc.target/msp430/pr78818-real.c: New template for tests.
      	* gcc.target/msp430/pr78818-auto.c: New test.
      	* gcc.target/msp430/pr78818-data-region.c: New test.
      	* gcc.target/msp430/pr78818-data-sec.c: New test.
      	* gcc.target/msp430/pr78818-auto-warn.c: New test.
      
      From-SVN: r249222
      Jozef Lawrynowicz committed
    • re PR rtl-optimization/80474 (ipa-cp wrongly adding LO(symbol) twice) · 0948d23f
      	PR rtl-optimization/80474
      	* reorg.c (update_block): Do not ignore instructions in a delay slot.
      
      From-SVN: r249219
      Eric Botcazou committed
    • Use pthread effective-target in testsuite · d1236680
      	* testsuite: Add dg-require-effective-target pthread to -pthread
      	tests.
      	Remove explicit target lists from dg-do and dg-options.
      
      	* testsuite/30_threads/async/forced_unwind.cc: Remove explit
      	target list from dg-options.
      	* testsuite/30_threads/packaged_task/forced_unwind.cc: Likewise.
      
      	* 30_threads/shared_mutex/cons/1.cc: Likewise.
      	Pass -pthread for all targets.
      	* 30_threads/shared_mutex/try_lock/1.cc: Likewise.
      	* 30_threads/shared_mutex/try_lock/2.cc: Likewise.
      	* 30_threads/shared_mutex/unlock/1.cc: Likewise.
      
      	* testsuite/30_threads/this_thread/57060.cc: Require c++11 via
      	dg-require-effective-target.
      
      From-SVN: r249217
      Rainer Orth committed
    • [ARM] Make gcc.target/arm/its.c more robust · 6820664a
      2017-06-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/testsuite/
          * gcc.target/arm/its.c: Check that no IT blocks has more than 2
          instructions in it rather than the number of IT blocks being 2.
          Transfer scan directive arm_thumb2 restriction to the whole
          testcase and restrict further to Thumb-only targets.
      
      From-SVN: r249215
      Thomas Preud'homme committed
    • sdiv_costs_1.c: Use dg-add-options. · 41c540fc
      2017-06-15  Tamar Christina  <tamar.christina@arm.com>
      
      	* gcc.target/arm/sdiv_costs_1.c:
      	Use dg-add-options.
      
      From-SVN: r249214
      Tamar Christina committed
    • rs6000: Don't use REGNO in the add<mode>3 expander · dfc10762
      The argument could be a subreg of reg instead, which means we have to
      use reg_or_subregno instead of REGNO.
      
      
      	* config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
      	of REGNO.
      
      From-SVN: r249213
      Segher Boessenkool committed
    • Daily bump. · 0f251244
      From-SVN: r249212
      GCC Administrator committed
  3. 14 Jun, 2017 25 commits