1. 24 Aug, 2016 7 commits
  2. 23 Aug, 2016 23 commits
    • s390.c (s390_asm_file_start): Call default_file_start. · 587b7f7a
      gcc/:
      	* config/s390/s390.c (s390_asm_file_start): Call
      	default_file_start.
      gcc/testsuite/:
      	* gcc.target/s390/nolrl-1.c: Don't match the file name.
      
      From-SVN: r239713
      Ian Lance Taylor committed
    • rs6000.c (rs6000_expand_vector_init): Set initialization of all 0's to the 0… · 6019c0fc
      rs6000.c (rs6000_expand_vector_init): Set initialization of all 0's to the 0 constant, instead of directly generating XOR.
      
      [gcc]
      2016-08-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	* config/rs6000/rs6000.c (rs6000_expand_vector_init): Set
      	initialization of all 0's to the 0 constant, instead of directly
      	generating XOR.  Add support for V4SImode vector initialization on
      	64-bit systems with direct move, and rework the ISA 3.0 V4SImode
      	initialization.  Change variables used in V4SFmode vector
      	intialization.  For V4SFmode vector splat on ISA 3.0, make sure
      	any memory addresses are in index form.  Add support for using
      	VSPLTH/VSPLTB to initialize vector short and vector char vectors
      	with all of the same element.
      	(regno_or_subregno): New helper function to return a register
      	number for either REG or SUBREG.
      	(rs6000_adjust_vec_address): Do not generate ADDI <reg>,R0,<num>.
      	Use regno_or_subregno where possible.
      	(rs6000_split_v4si_init_di_reg): New helper function to build up a
      	DImode value from two SImode values in order to generate V4SImode
      	vector initialization on 64-bit systems with direct move.
      	(rs6000_split_v4si_init): Split up the insns for a V4SImode vector
      	initialization.
      	(rtx_is_swappable_p): V4SImode vector initialization insn is not
      	swappable.
      	* config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Add
      	declaration.
      	* config/rs6000/vsx.md (VSX_SPLAT_I): New mode iterators and
      	attributes to initialize V8HImode and V16QImode vectors with the
      	same element.
      	(VSX_SPLAT_COUNT): Likewise.
      	(VSX_SPLAT_SUFFIX): Likewise.
      	(UNSPEC_VSX_VEC_INIT): New unspec.
      	(vsx_concat_v2sf): Eliminate using 'preferred' register classes.
      	Allow SFmode values to come from Altivec registers.
      	(vsx_init_v4si): New insn/split for V4SImode vector initialization
      	on 64-bit systems with direct move.
      	(vsx_splat_<mode>, VSX_W iterator): Rework V4SImode and V4SFmode
      	vector initializations, to allow V4SImode vector initializations
      	on 64-bit systems with direct move.
      	(vsx_splat_v4si): Likewise.
      	(vsx_splat_v4si_di): Likewise.
      	(vsx_splat_v4sf): Likewise.
      	(vsx_splat_v4sf_internal): Likewise.
      	(vsx_xxspltw_<mode>, VSX_W iterator): Eliminate using 'preferred'
      	register classes.
      	(vsx_xxspltw_<mode>_direct, VSX_W iterator): Likewise.
      	(vsx_vsplt<VSX_SPLAT_SUFFIX>_di): New insns to support
      	initializing V8HImode and V16QImode vectors with the same
      	element.
      	* config/rs6000/rs6000.h (TARGET_DIRECT_MOVE_64BIT): Disallow
      	optimization if -maltivec=be.
      
      [gcc/testsuite]
      2016-08-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	* gcc.target/powerpc/vec-init-1.c: Add tests where the vector is
      	being created from pointers to memory locations.
      	* gcc.target/powerpc/vec-init-2.c: Likewise.
      
      From-SVN: r239712
      Michael Meissner committed
    • line-map.h: add source_range::from_locations · d672cded
      libcpp/ChangeLog:
      	* include/line-map.h (source_range::from_locations): New method.
      
      From-SVN: r239711
      David Malcolm committed
    • [ARM] Fix predicable_short_it attribute for arm_movqi_insn · 0da825e9
      2016-08-23  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	* config/arm/arm.md (arm_movqi_insn): Swap predicable_short_it
      	attribute for alternatives 3 and 4.
      
      From-SVN: r239710
      Christophe Lyon committed
    • decl.c (gfc_match_structure_decl): Make gfc_structure_id static. · cfe37db4
      2016-08-23  Fritz Reese  <fritzoreese@gmail.com>
      
      	gcc/fortran/
      	* decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
      
      	gcc/testsuite/gfortran.dg/
      	* dec_structure_12.f90: New testcase.
      
      From-SVN: r239709
      Fritz Reese committed
    • compiler: revamp scheme for ordering calls to import init fcns. · c0ccddb4
          
          Switch to a new method for determining the order in which import init
          functions are invoked: build an init fcn dependence DAG and walk the DAG
          to rewrite/adjust priorities to account for discrepancies introduced by
          "go test".
          
          This patch includes a change to the export data format generated
          by gccgo. Older versions of gccgo will not be able to read object files
          produced by a newer gccgo, but the new gcc will still be able to read
          old object files.
          
          Fixes golang/go#15738.
          
          Reviewed-on: https://go-review.googlesource.com/25301
      
      From-SVN: r239708
      Ian Lance Taylor committed
    • selftest.h: add ASSERT_STR_CONTAINS · 9f589786
      gcc/ChangeLog:
      	* selftest.c (selftest::assert_str_contains): New function.
      	(selftest::test_assertions): Verify ASSERT_STR_CONTAINS.
      	* selftest.h (selftest::assert_str_contains): New decl.
      	(ASSERT_STR_CONTAINS): New macro.
      
      From-SVN: r239707
      David Malcolm committed
    • interface.c (compare_components): Fix typo in name check conditional. · a181ec03
      2016-08-23  Fritz Reese  <fritzoreese@gmail.com>
      
      	gcc/fortran/
      	* interface.c (compare_components): Fix typo in name check conditional.
      
      From-SVN: r239706
      Fritz Reese committed
    • Add C++17 constexpr to debug and profile mode arrays · e90a8010
      	* include/debug/array (array): Add _GLIBCXX17_CONSTEXPR.
      	* include/profile/array (array): Likewise.
      	(array::swap): Fix exception specification for zero-sized arrays.
      
      From-SVN: r239705
      Jonathan Wakely committed
    • re PR tree-optimization/77286 (ICE in fold_convert_loc, at fold-const.c:2248 building 435.gromacs) · 027f1004
      2016-08-23  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/77286
      	* tree-vect-loop.c (vect_analyze_loop_form_1): Do not modify
      	the CFG here.
      	(vect_transform_loop): Split exit edges of loop and scalar
      	loop if required and at the appropriate time.
      
      From-SVN: r239700
      Richard Biener committed
    • libstdc++/77334 move assign RB trees of non-copyable types · 5ea387db
      	PR libstdc++/77334
      	* include/bits/stl_tree.h (_Rb_tree::_M_move_assign): New functions.
      	(_Rb_tree::operator=(_Rb_tree&&)): Dispatch to _M_move_assign.
      	* testsuite/23_containers/map/77334.cc: New test.
      
      From-SVN: r239698
      Jonathan Wakely committed
    • Remove reference to -pthreads option in libstdc++ manual · 5d1c6b3e
      	* doc/xml/manual/using.xml: Remove reference to -pthreads option.
      	* doc/html/*: Regenerate.
      
      From-SVN: r239693
      Jonathan Wakely committed
    • Use dg-do preprocess instead of compile for tests · 457c4a3f
      	* testsuite/experimental/feat-cxx14.cc: Only preprocess, not compile.
      	* testsuite/experimental/feat-lib-fund.cc: Likewise.
      
      From-SVN: r239692
      Jonathan Wakely committed
    • Implement resolution of LWG DR 685 precisely · b405d54f
      	PR libstdc++/71771
      	* include/bits/stl_iterator.h
      	(operator-(reverse_iterator<Iter>, reverse_iterator<Iter>): Only
      	define for C++98 mode.
      	(operator-(move_iterator<Iter>, move_iterator<Iter>): Don't define.
      	* testsuite/24_iterators/headers/iterator/synopsis.cc: Use
      	-std=gnu++98.
      	* testsuite/24_iterators/headers/iterator/synopsis_c++11.cc: New test.
      	* testsuite/24_iterators/headers/iterator/synopsis_c++14.cc: New test.
      	* testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: New test.
      	* testsuite/24_iterators/move_iterator/greedy_ops.cc: Don't test
      	difference operator.
      	* testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Only test
      	difference operator for C++98.
      	* testsuite/24_iterators/reverse_iterator/71771.cc: New test.
      
      From-SVN: r239691
      Jonathan Wakely committed
    • Add constexpr to <iterator> and <array> for C++17 · 06db9920
      	* include/bits/c++config (_GLIBCXX17_CONSTEXPR): Define.
      	* include/bits/range_access.h (begin, end, rbegin, rend, crbegin)
      	(crend): Add _GLIBCXX17_CONSTEXPR as per P0031R0.
      	* include/bits/stl_iterator.h (reverse_iterator, move_iterator)
      	(__make_reverse_iterator, make_reverse_iterator, make_move_iterator):
      	Likewise.
      	* include/bits/stl_iterator_base_funcs.h (__distance, __advance): Add
      	_GLIBCXX14_CONSTEXPR.
      	(distance, advance, next, prev): Add _GLIBCXX17_CONSTEXPR.
      	* include/std/array (array::begin, array::end, array::rbegin)
      	(array::rend, array::cbegin, array:cend, array::crbegin)
      	(array::crend, array::operator[], array::at, array::front)
      	(array::back, array::data): Likewise.
      	* testsuite/24_iterators/headers/iterator/range_access.cc: Replace
      	with separate tests for C++11, C++14, and C++17.
      	* testsuite/24_iterators/headers/iterator/range_access_c++11.cc: New.
      	* testsuite/24_iterators/headers/iterator/range_access_c++14.cc: New.
      	* testsuite/24_iterators/headers/iterator/range_access_c++17.cc: New.
      
      From-SVN: r239690
      Jonathan Wakely committed
    • Drop excess size used for run time allocated stack variables. · 1135a133
      * get_dynamic_stack_size is passed a SIZE of a data block (which is
        allocated elsewhere), the SIZE_ALIGN of the SIZE (i.e. the alignment
        of the underlying memory units (e.g. 32 bytes split into 4 times 8
        bytes = 64 bit alignment) and the REQUIRED_ALIGN of the data portion
        of the allocated memory.
      
      * Assuming the function is called with SIZE = 2, SIZE_ALIGN = 8 and
        REQUIRED_ALIGN = 64 it first adds 7 bytes to SIZE -> 9.  This is
        what is needed to have two bytes 8-byte-aligned at some memory
        location without any known alignment.
      
      * Finally round_push is called to round up SIZE to a multiple of the
        stack slot size.
      
      The key to understanding this is that the function assumes that
      STACK_DYNMAIC_OFFSET is completely unknown at the time its called
      and therefore it does not make assumptions about the alignment of
      STACKPOINTER + STACK_DYNMAIC_OFFSET.  The latest patch simply
      hard-codes that SP + SDO is supposed to be aligned to at least
      stack slot size (and does that in a very complicated way).  Since
      there is no guarantee that this is the case on all targets, the
      patch is broken.  It may miscalculate a SIZE that is too small in
      some cases.
      
      However, on many targets there is some guarantee about the
      alignment of SP + SDO even if the actual value of SDO is unknown.
      On s390x it's always 8-byte-aligned (stack slot size).  So the
      right fix should be to add knowledge about the target's guaranteed
      alignment of SP + SDO to the function.  I'm right now testing a
      much simpler patch that uses
      REGNO_POINTER_ALIGN(VIRTUAL_STACK_DYNAMIC_REGNUM) as the
      alignment.
      
      
      gcc/ChangeLog:
      
      2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	* explow.c (get_dynamic_stack_size): Take known alignment of stack
      	pointer + STACK_DYNAMIC_OFFSET into account when calculating the
      	size needed.  Correct a typo in a comment.
      
      From-SVN: r239688
      Dominik Vogt committed
    • S/390: Fix insv-1.c test with -m31. · 7e11f46f
      gcc/testsuite/ChangeLog:
      
      2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	* gcc.target/s390/insv-1.c: Fix test when running with -m31.
      
      From-SVN: r239687
      Dominik Vogt committed
    • S/390: Improve result verification in test case vec-genmask-1.c. · 7ab4f354
      THe attached patch improves checking of teh results of the subtests
      "a" and "f".  As they share the same "vone" instruction, the duplicate
      scan-assembler-times was bogus.  Moved "f" to a separate function to
      fix this.  Also double check that no extra "vgmf" instructions are
      used.
      
      gcc/testsuite/ChangeLog:
      
      2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	* gcc.target/s390/zvector/vec-genmask-1.c: Improve result
      	verification.
      
      From-SVN: r239686
      Dominik Vogt committed
    • S/390: Add splitter for "and" with complement. · deb9351f
      Split ~b & a to (b & a) ^ a.  This is benefitial on z Systems since we
      otherwise need a big -1 constant to be loaded for the ~b.
      	
      gcc/ChangeLog:
      
      2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	* config/s390/s390.md ("*andc_split"): New splitter for and with
      	complement.
      
      gcc/testsuite/ChangeLog:
      
      2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
      
      	* gcc.target/s390/md/andc-splitter-1.c: New test case.
      	* gcc.target/s390/md/andc-splitter-2.c: Likewise.
      
      From-SVN: r239685
      Dominik Vogt committed
    • re PR middle-end/27336 (delete null checks in callers to nonnull functions) · 1fd9f058
      2016-08-23  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/27336
      	* tree-vrp.c (infer_value_range): Handle stmts that can throw
      	by looking for a non-EH edge.
      	(process_assert_insertions_for): Likewise.
      
      	* c-c++-common/pr27336.c: New testcase.
      
      From-SVN: r239684
      Richard Biener committed
    • re PR lto/77305 (-fdump-tree-all and -flto causes ICE) · e83421c0
      2016-08-23  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/77305
      	* statistics.c (statistics_counter_event): Robustify against
      	NULL current_pass.
      
      From-SVN: r239683
      Richard Biener committed
    • 2016-08-23 Venkataramanan Kumar · 9c810a4e
      	* config/i386/i386.c (processor_alias_table): Enable PTA_PRFCHW
      	for targets amdfam10 and barcelona.
      
      From-SVN: r239682
      Venkataramanan Kumar committed
    • Daily bump. · 3dce0662
      From-SVN: r239680
      GCC Administrator committed
  3. 22 Aug, 2016 10 commits
    • re PR c++/77321 (crash in warn_for_memset) · b00e6e75
      	PR c++/77321
      	* c-common.c (warn_for_memset): Check type for null.
      
      	* g++.dg/cpp1y/pr77321.C: New test.
      
      From-SVN: r239676
      Marek Polacek committed
    • compiler: don't permit P.M if P is a pointer type · bb748b89
          
          When lowering method expressions of the form "P.M" where
          P is a pointer type (e.g. "type P *T") make sure we examine
          the method set of P and not T during method lookup.
          
          Fixes golang/go#15722.
          
          Reviewed-on: https://go-review.googlesource.com/24843
      
      From-SVN: r239675
      Ian Lance Taylor committed
    • Split _M_dfs() into smaller functions. · d79d6252
      	* regex_executor.h(_M_handle_repeat, _M_handle_subexpr_begin)
      	(_M_handle_subexpr_end, _M_handle_line_begin_assertion)
      	(_M_handle_line_end_assertion, _M_handle_word_boundary)
      	(_M_handle_subexpr_lookahead, _M_handle_match)
      	(_M_handle_backref, _M_handle_accept, _M_handle_alternative):
      	Add separate function declarations.
      	* regex_executor.tcc: Split _M_dfs() into multiple handler functions.
      
      From-SVN: r239673
      Tim Shen committed
    • i386.md (*zero_extendsidi2): Add (*r,*k) alternative. · bef18c63
      	* config/i386/i386.md (*zero_extendsidi2): Add (*r,*k) alternative.
      	(zero_extend<mode>di2): Ditto.
      	(*zero_extend<mode>si2): Ditto.
      	(*zero_extendqihi2): Ditto.
      
      From-SVN: r239672
      Uros Bizjak committed
    • re PR fortran/60774 (f951: internal compiler error: Segmentation fault: 11) · 58338bac
      2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
      	    Bud Davis  <jmdavis@link.com>
      
      	PR fortran/60774
      	* parse.c (next_free,next_fixed): Issue error for statement label
      	without a statement.
      
      2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/60774
      	* gfortran.dg/empty_label.f: Adjust test for new error message.
      	* gfortran.dg/empty_label.f90: Ditto.
      	* gfortran.dg/empty_label_typedecl.f90: Ditto.
      	* gfortran.dg/label_3.f90: Deleted (redundant with empty_label.f90).
      	* gfortran.dg/warnings_are_errors_1.f90: Remove invalid statement label.
      
      Co-Authored-By: Bud Davis <jmdavis@link.com>
      
      From-SVN: r239668
      Steven G. Kargl committed
    • re PR fortran/61318 (Improve error diagnostic by pointing to the expression and… · 30364ce6
      re PR fortran/61318 (Improve error diagnostic by pointing to the expression and not to declared-at of a USE-associated variable)
      
      2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/61318
      	* interface.c (compare_parameter): Use better locus for error message.
      
      2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/61318
      	* gfortran.dg/pr61318.f90: New test.
      
      From-SVN: r239667
      Steven G. Kargl committed
    • re PR fortran/77260 (bogus warning with ENTRY in a function) · ad7a5a8f
      2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/77260
      	* gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
      	for unused variable if symbol is entry point.
      
      2016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/77260
      	* gfortran.dg/pr77260_1.f90: New test.
      	* gfortran.dg/pr77260_2.f90: Ditto.
      
      From-SVN: r239666
      Steven G. Kargl committed
    • Support __builtin_isinf_sign for new floating-point types (PR middle-end/77269). · 72f52f30
      The __builtin_isinf_sign folding uses a type-specific signbit built-in
      function, meaning it only works for the types float, double and long
      double, not for types such as _FloatN, _FloatNx, __float128.  Since
      the signbit built-in function is now type-generic, that can be used
      unconditionally, much as the code uses the type-generic isinf built-in
      function unconditionally, and this patch makes it do so, thereby
      enabling __builtin_isinf_sign (which glibc uses to expand the isinf
      macro since that macro in glibc traditionally provided the stronger
      guarantees about the return value given by __builtin_isinf_sign) to
      work for all floating-point types.
      
      The test gcc.dg/torture/builtin-isinf_sign-1.c needs updating because
      it tests that comparisons of calls to __builtin_isinf_sign to
      conditional expressions involving __builtin_isinf and
      __builtin_signbit* get optimized away, and with a change of what
      particular built-in function for signbit is used, GCC doesn't notice
      the expressions with type-generic and non-type-generic built-in
      functions are equivalent at -O0 or -O1 (it does optimize away the
      original test at -O2).
      
      Bootstrapped with no regressions on x86_64-pc-linux-gnu.
      
      	PR middle-end/77269
      gcc:
      	* builtins.c (fold_builtin_classify): Use builtin_decl_explicit
      	(BUILT_IN_SIGNBIT) to expand __builtin_isinf_sign.
      
      gcc/testsuite:
      	* gcc.dg/torture/builtin-isinf_sign-1.c: Use __builtin_signbit not
      	__builtin_signbitf and __builtin_signbitl in expected generic
      	expansion.
      	* gcc.dg/torture/float128-tg-2.c, gcc.dg/torture/float128x-tg-2.c,
      	gcc.dg/torture/float16-tg-2.c, gcc.dg/torture/float32-tg-2.c,
      	gcc.dg/torture/float32x-tg-2.c, gcc.dg/torture/float64-tg-2.c,
      	gcc.dg/torture/float64x-tg-2.c, gcc.dg/torture/floatn-tg-2.h: New
      	tests.
      
      From-SVN: r239665
      Joseph Myers committed
    • libstdc++/68297 avoid throw/catch in make_exception_ptr · 27abac26
      2016-08-22  Gleb Natapov  <gleb@scylladb.com>
      
      	PR libstdc++/68297
      	* config/abi/pre/gnu-versioned-namespace.ver: Export
      	__cxa_init_primary_exception and std::exception_ptr(void*).
      	* config/abi/pre/gnu.ver (CXXABI_1.3.11) : Add new symbol version and
      	export __cxa_init_primary_exception and std::exception_ptr(void*).
      	* include/Makefile.am: Add new headers.
      	* include/Makefile.in: Regenerate.
      	* libsupc++/Makefile.am: Add new headers.
      	* libsupc++/Makefile.in: Regenerate.
      	* libsupc++/cxxabi.h (__cxa_allocate_exception): Move to ...
      	* libsupc++/cxxabi_init_exception.h: New header.
      	(__cxa_init_primary_exception): Declare.
      	* libsupc++/eh_throw.cc (__cxa_init_primary_exception): Define.
      	(__cxa_throw): Use __cxa_init_primary_exception.
      	* libsupc++/exception (std::exception): Move to ...
      	* libsupc++/exception.h: New header.
      	* libsupc++/exception_ptr.h (__exception_ptr::exception_ptr): Add
      	friend declaration.
      	(__exception_ptr::__dest_thunk): New function template.
      	(std::make_exception_ptr) [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]:
      	Use __cxa_allocate_exception and __cxa_init_primary_exception to
      	create exception_ptr.
      	* libsupc++/typeinfo: Include bits/exception.h instead of exception.
      	* testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.11 version.
      
      From-SVN: r239664
      Gleb Natapov committed
    • Update links to libstdc++ Doxygen pages · 4c86ffcc
      	* doc/xml/api.xml: Replace hardcoded links for specific versions with
      	link to docs for all releases.
      	* doc/html/*: Regenerate.
      
      From-SVN: r239663
      Jonathan Wakely committed