1. 06 Nov, 2018 12 commits
    • Enable libsanitizer on Solaris (PR sanitizer/80953) · aaabfd71
      	gcc:
      	PR sanitizer/80953
      	* config/sol2.h (ASAN_CC1_SPEC): Define.
      	(LD_WHOLE_ARCHIVE_OPTION): Define.
      	(LD_NO_WHOLE_ARCHIVE_OPTION): Define.
      	(ASAN_REJECT_SPEC): Provide default.
      	(LIBASAN_EARLY_SPEC): Define.
      	(LIBTSAN_EARLY_SPEC): Define.
      	(LIBLSAN_EARLY_SPEC): Define.
      	* config/i386/sol2.h (CC1_SPEC): Redefine.
      	(ASAN_REJECT_SPEC): Define.
      
      	* config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
      	(TARGET_ASAN_SHADOW_OFFSET): Define.
      	(sparc_asan_shadow_offset): New function.
      	* config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
      	(ASAN_REJECT_SPEC): Define.
      
      	gcc/testsuite:
      	PR sanitizer/80953
      	* c-c++-common/asan/alloca_loop_unpoisoning.c: Require alloca
      	support.
      	(foo): Use __builtin_alloca.
      
      	libsanitizer:
      	PR sanitizer/80953
      	* configure.tgt (sparc*-*-solaris2.11*): Enable.
      	(x86_64-*-solaris2.11* | i?86-*-solaris2.11*): Enable.
      
      From-SVN: r265837
      Rainer Orth committed
    • Cherry-pick Solaris sanitizer fixes (PR sanitizer/80953) · 0b5ccc80
      	PR sanitizer/80953
      	* sanitizer_common/sanitizer_internal_defs.h,
      	sanitizer_common/sanitizer_platform_limits_solaris.h,
      	sanitizer_common/sanitizer_procmaps_solaris.cc,
      	sanitizer_common/sanitizer_solaris.cc: Cherry-pick compiler-rt
      	revision 346153.
      	* sanitizer_common/sanitizer_stacktrace.h,
      	sanitizer_common/sanitizer_stacktrace_sparc.cc: Cherry-pick
      	compiler-rt revision 346155.
      
      From-SVN: r265836
      Rainer Orth committed
    • tbaa-1.c: New testcase. · 2a98b4bf
      
      	* gcc.dg/lto/tbaa-1.c: New testcase.
      
      	* tree.c (fld_type_variant): Copy canonical type.
      	(fld_incomplete_type_of): Check that canonical types looks sane;
      	copy canonical type.
      	(verify_type): Accept when incomplete type has complete canonical type.
      
      From-SVN: r265835
      Jan Hubicka committed
    • tree.c (free_lang_data): Reset overwite_assembler_name... · 23cab40d
      	* tree.c (free_lang_data): Reset overwite_assembler_name,
      	print_xnode, print_decl, print_type and print_identifier of
      	langhooks.
      
      From-SVN: r265834
      Jan Hubicka committed
    • re PR tree-optimization/87889 (CPU2000 177.mesa failed to build) · d8564d45
      2018-11-06  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/87889
      	* tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
      	Do nothing if old and new arg are the same
      
      	* gcc.dg/pr87894.c: New testcase.
      
      From-SVN: r265833
      Richard Biener committed
    • S/390: Fix PR87723 · 8c21b0d1
      gcc/ChangeLog:
      
      2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/87723
      	* config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
      	attributes for operands 3 and 4.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/87723
      	* gcc.target/s390/pr87723.c: New test.
      
      From-SVN: r265832
      Andreas Krebbel committed
    • re PR ada/81878 (--disable-bootstrap --enable-languages=ada fails) · d24c3ef2
      	PR ada/81878
      	Revert
      	2018-10-29  Tamar Christina  <tamar.christina@arm.com>
      
      	PR ada/81878
      	* Makefile.in (TOOLS_FLAGS_TO_PASS_NATIVE): Add -B ../../.
      
      	2017-08-17  Richard Biener  <rguenther@suse.de>
      
      	PR ada/81878
      	* Makefile.in (CXX_LFLAGS): Remove.
      	(TOOLS_FLAGS_TO_PASS_NATIVE): Pass $(CXX) as CXX.
      	(TOOLS_FLAGS_TO_PASS_RE): Likewise.
      
      From-SVN: r265830
      Eric Botcazou committed
    • re PR middle-end/18041 (OR of two single-bit bitfields is inefficient) · ffe5a586
      2018-11-06  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/18041
      	* simplify-rtx.c (simplify_binary_operation_1): Add pattern
      	matching bitfield insertion.
      
      	* gcc.target/i386/pr18041-1.c: New testcase.
      	* gcc.target/i386/pr18041-2.c: Likewise.
      
      From-SVN: r265829
      Richard Biener committed
    • gOlogy: fix debug binds in auto-inc-dec · 91c03124
      As auto_inc_dec pass combines incs and mems from different insns, it
      often causes regs to temporarily hold a value different from the one
      it would before the transformation.  Debug insns within that range
      would therefore end up binding to the wrong expression after the
      transformation.
      
      This patch adjusts debug binds in the affected range.
      
      for  gcc/ChangeLog
      
      	* auto-inc-dec.c: Include valtrack.h.  Improve comments.
      	(reg_next_debug_use): New.
      	(attempt_change): Propagate adjusted expression into affected
      	debug insns.
      	(merge_in_block): Track uses in debug insns.
      	(pass_inc_dec::execute): Allocate and release
      	reg_next_debug_use.
      
      From-SVN: r265828
      Alexandre Oliva committed
    • avx512fintrin.h: Update VFIXUPIMM* intrinsics. · ce2ad8cc
      gcc/
      2018-11-06 Wei Xiao <wei3.xiao@intel.com>
      
      	* config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
      	(_mm512_fixupimm_round_pd): Update parameters and builtin.
      	(_mm512_maskz_fixupimm_round_pd): Ditto.
      	(_mm512_fixupimm_round_ps): Ditto.
      	(_mm512_maskz_fixupimm_round_ps): Ditto.
      	(_mm_fixupimm_round_sd): Ditto.
      	(_mm_maskz_fixupimm_round_sd): Ditto.
      	(_mm_fixupimm_round_ss): Ditto.
      	(_mm_maskz_fixupimm_round_ss): Ditto.
      	(_mm512_fixupimm_pd): Ditto.
      	(_mm512_maskz_fixupimm_pd): Ditto.
      	(_mm512_fixupimm_ps): Ditto.
      	(_mm512_maskz_fixupimm_ps): Ditto.
      	(_mm_fixupimm_sd): Ditto.
      	(_mm_maskz_fixupimm_sd): Ditto.
      	(_mm_fixupimm_ss): Ditto.
      	(_mm_maskz_fixupimm_ss): Ditto.
      	(_mm512_mask_fixupimm_round_pd): Update builtin.
      	(_mm512_mask_fixupimm_round_ps): Ditto.
      	(_mm_mask_fixupimm_round_sd): Ditto.
      	(_mm_mask_fixupimm_round_ss): Ditto.
      	(_mm512_mask_fixupimm_pd): Ditto.
      	(_mm512_mask_fixupimm_ps): Ditto.
      	(_mm_mask_fixupimm_sd): Ditto.
      	(_mm_mask_fixupimm_ss): Ditto.
      	* config/i386/avx512vlintrin.h:
      	(_mm256_fixupimm_pd): Update parameters and builtin.
      	(_mm256_maskz_fixupimm_pd): Ditto.
      	(_mm256_fixupimm_ps): Ditto.
      	(_mm256_maskz_fixupimm_ps): Ditto.
      	(_mm_fixupimm_pd): Ditto.
      	(_mm_maskz_fixupimm_pd): Ditto.
      	(_mm_fixupimm_ps): Ditto.
      	(_mm_maskz_fixupimm_ps): Ditto.
      	(_mm256_mask_fixupimm_pd): Update builtin.
      	(_mm256_mask_fixupimm_ps): Ditto.
      	(_mm_mask_fixupimm_pd): Ditto.
      	(_mm_mask_fixupimm_ps): Ditto.
      	* config/i386/i386-builtin-types.def: Add new types and remove useless ones.
      	* config/i386/i386-builtin.def: Update builtin definitions.
      	* config/i386/i386.c: Handle new builtin types and remove useless ones.
      	* config/i386/sse.md: Update VFIXUPIMM* patterns.
      	(<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
      	(<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
      	(<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
      	(avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
      	(avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
      	(avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
      	* config/i386/subst.md:
      	(round_saeonly_sd_mask_operand4): Add new subst_attr.
      	(round_saeonly_sd_mask_op4): Ditto.
      	(round_saeonly_expand_operand5): Ditto.
      	(round_saeonly_expand): Update.
      
      gcc/testsuite/
      2018-11-06 Wei Xiao <wei3.xiao@intel.com>
      
      	* gcc.target/i386/avx-1.c: Update tests for VFIXUPIMM* intrinsics.
      	* gcc.target/i386/avx512f-vfixupimmpd-1.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmpd-2.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmps-1.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmsd-1.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmss-1.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto.
      	* gcc.target/i386/avx512vl-vfixupimmpd-1.c: Ditto.
      	* gcc.target/i386/avx512vl-vfixupimmps-1.c: Ditto.
      	* gcc.target/i386/sse-13.c: Ditto.
      	* gcc.target/i386/sse-14.c: Ditto.
      	* gcc.target/i386/sse-22.c: Ditto.
      	* gcc.target/i386/sse-23.c: Ditto.
      	* gcc.target/i386/testimm-10.c: Ditto.
      	* gcc.target/i386/testround-1.c: Ditto.
      
      From-SVN: r265827
      Wei Xiao committed
    • Daily bump. · 40228b24
      From-SVN: r265826
      GCC Administrator committed
  2. 05 Nov, 2018 28 commits
    • gcc: xtensa: don't force PIC for uclinux target · 3cd732e5
      xtensa-uclinux uses bFLT executable file format that cannot relocate
      fields representing offsets from data to code. C++ objects built as PIC
      use offsets to encode FDE structures. As a result C++ exception handling
      doesn't work correctly on xtensa-uclinux. Don't use PIC by default on
      xtensa-uclinux.
      
      gcc/
      2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
      
      	* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
      
      From-SVN: r265823
      Max Filippov committed
    • Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). · 4239f144
      libquadmath sources are mostly based on glibc sources at present, but
      derived from them by a manual editing / substitution process and with
      subsequent manual merges.  The manual effort involved in merges means
      they are sometimes incomplete and long-delayed.
      
      Since libquadmath was first created, glibc's support for this format
      has undergone significant changes so that it can also be used in glibc
      to provide *f128 functions for the _Float128 type from TS 18661-3.
      This makes it significantly easier to use it for libquadmath in a more
      automated fashion, since glibc has a float128_private.h header that
      redefines many identifiers as macros as needed for building *f128
      functions.
      
      Simply using float128_private.h directly in libquadmath, with
      unmodified glibc sources except for changing function names in that
      one header to be *q instead of *f128, would be tricky, given its
      dependence on lots of other glibc-internal headers (whereas
      libquadmath supports non-glibc systems), and also given how some libm
      functions in glibc are built from type-generic templates using a
      further set of macros rather than from separate function
      implementations for each type.
      
      So instead this patch adds a script update-quadmath.py to convert
      glibc sources into libquadmath ones, and the script reads
      float128_private.h to identify many of the substitutions it should
      make.  quadmath-imp.h is updated with various new internal
      definitions, taken from glibc as needed; this is the main place
      expected to need updating manually when subsequent merges from glibc
      are done using the script.  No attempt is made to make the script
      output match the details of existing formatting, although the
      differences are of a size that makes a rough comparison (ignoring
      whitespace) possible.
      
      Two new public interfaces are added to libquadmath, exp2q and
      issignalingq, at a new QUADMATH_1.2 symbol version, since those
      interfaces are used internally by some of the glibc sources being
      merged into libquadmath; although there is a new symbol version, no
      change however is made to the libtool version in the libtool-version
      file.  Although there are various other interfaces now in glibc libm
      but not in libquadmath, this patch does nothing to add such interfaces
      (although adding many of them would in fact be easy to do, given the
      script).
      
      One internal file (not providing any public interfaces),
      math/isinf_nsq.c, is removed, as no longer used by anything in
      libquadmath after the merge.
      
      Conditionals in individual source files on <fenv.h> availability or
      features are moved into quadmath-imp.h (providing trivial macro
      versions of the functions if real implementations aren't available),
      to simplify the substitutions in individual source files.  Note
      however that I haven't tested for any configurations lacking <fenv.h>,
      so further changes could well be needed there.
      
      Two files in libquadmath/math/ are based on glibc sources but not
      updated in this patch: fmaq.c and rem_pio2q.c.  Both could be updated
      after further changes to the script (and quadmath-imp.h as needed); in
      the case of rem_pio2q.c, based on two separate glibc source files,
      those separate files would naturally be split out into separate
      libquadmath source files in the process (as done in this patch with
      expq_table.h and tanq_kernel.c, where previously two glibc source
      files had been merged into one libquadmath source file).  complex.c,
      nanq.c and sqrtq.c are not based on glibc sources (though four of the
      (trivial) functions in complex.c could readily be replaced by instead
      using the four corresponding files from glibc, if desired).
      
      libquadmath also has printf/ and strtod/ sources based on glibc, also
      mostly not updated for a long time.  Again the script could no doubt
      be made to generate those automatically, although that would be a
      larger change (effectively some completely separate logic in the
      script, not sharing much if anything with the existing code).
      
      Bootstrapped with no regressions on x86_64-pc-linux-gnu.
      
      	PR libquadmath/68686
      	* Makefile.am: (libquadmath_la_SOURCES): Remove math/isinf_nsq.c.
      	Add math/exp2q.c math/issignalingq.c math/lgammaq_neg.c
      	math/lgammaq_product.c math/tanq_kernel.c math/tgammaq_product.c
      	math/casinhq_kernel.c.
      	* Makefile.in: Regenerate.
      	* libquadmath.texi (exp2q, issignalingq): Document.
      	* quadmath-imp.h: Include <errno.h>, <limits.h>, <stdbool.h> and
      	<fenv.h>.
      	(HIGH_ORDER_BIT_IS_SET_FOR_SNAN, FIX_FLT128_LONG_CONVERT_OVERFLOW)
      	(FIX_FLT128_LLONG_CONVERT_OVERFLOW, __quadmath_kernel_tanq)
      	(__quadmath_gamma_productq, __quadmath_gammaq_r)
      	(__quadmath_lgamma_negq, __quadmath_lgamma_productq)
      	(__quadmath_lgammaq_r, __quadmath_kernel_casinhq, mul_splitq)
      	(math_check_force_underflow_complex, __glibc_likely)
      	(__glibc_unlikely, struct rm_ctx, SET_RESTORE_ROUNDF128)
      	(libc_feholdsetround_ctx, libc_feresetround_ctx): New.
      	(feraiseexcept, fenv_t, feholdexcept, fesetround, feupdateenv)
      	(fesetenv, fetestexcept, feclearexcept): Define if not supported
      	through <fenv.h>.
      	(__quadmath_isinf_nsq): Remove.
      	* quadmath.h (exp2q, issignalingq): New.
      	* quadmath.map (QUADMATH_1.2): New.
      	* quadmath_weak.h (exp2q, issignalingq): New.
      	* update-quadmath.py: New file.
      	* math/isinf_nsq.c: Remove file.
      	* math/casinhq_kernel.c, math/exp2q.c, math/expq_table.h,
      	math/issignalingq.c, math/lgammaq_neg.c, math/lgammaq_product.c,
      	math/tanq_kernel.c, math/tgammaq_product.c: New files.  Generated
      	from glibc sources with update-quadmath.py.
      	* math/acoshq.c, math/acosq.c, math/asinhq.c, math/asinq.c,
      	math/atan2q.c, math/atanhq.c, math/atanq.c, math/cacoshq.c,
      	math/cacosq.c, math/casinhq.c, math/casinq.c, math/catanhq.c,
      	math/catanq.c, math/cbrtq.c, math/ccoshq.c, math/ceilq.c,
      	math/cexpq.c, math/cimagq.c, math/clog10q.c, math/clogq.c,
      	math/conjq.c, math/copysignq.c, math/coshq.c, math/cosq.c,
      	math/cosq_kernel.c, math/cprojq.c, math/crealq.c, math/csinhq.c,
      	math/csinq.c, math/csqrtq.c, math/ctanhq.c, math/ctanq.c,
      	math/erfq.c, math/expm1q.c, math/expq.c, math/fabsq.c,
      	math/fdimq.c, math/finiteq.c, math/floorq.c, math/fmaxq.c,
      	math/fminq.c, math/fmodq.c, math/frexpq.c, math/hypotq.c,
      	math/ilogbq.c, math/isinfq.c, math/isnanq.c, math/j0q.c,
      	math/j1q.c, math/jnq.c, math/ldexpq.c, math/lgammaq.c,
      	math/llrintq.c, math/llroundq.c, math/log10q.c, math/log1pq.c,
      	math/log2q.c, math/logbq.c, math/logq.c, math/lrintq.c,
      	math/lroundq.c, math/modfq.c, math/nearbyintq.c,
      	math/nextafterq.c, math/powq.c, math/remainderq.c, math/remquoq.c,
      	math/rintq.c, math/roundq.c, math/scalblnq.c, math/scalbnq.c,
      	math/signbitq.c, math/sincos_table.c, math/sincosq.c,
      	math/sincosq_kernel.c, math/sinhq.c, math/sinq.c,
      	math/sinq_kernel.c, math/tanhq.c, math/tanq.c, math/tgammaq.c,
      	math/truncq.c, math/x2y2m1q.c: Regenerate from glibc sources with
      	update-quadmath.py.
      
      From-SVN: r265822
      Joseph Myers committed
    • combine: Don't make an intermediate reg for assigning to sfp (PR87871) · 0f31a750
      The code with an intermediate register is perfectly fine, but LRA
      apparently cannot handle the resulting code, or perhaps something else
      is wrong.  In either case, making an extra temporary will not likely
      help here, so let's just skip it.
      
      
      	PR rtl-optimization/87871
      	* combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
      
      From-SVN: r265821
      Segher Boessenkool committed
    • compiler: handle abstract type in builtin numeric const value · 7bbdffa2
          
          Builtin_call_expression::do_numeric_constant_value can be called by
          Array_type::verify_length before the determine types pass, so accept
          an abstract type.
          
          Test case is https://golang.org/cl/147537.
          
          Fixes golang/go#28601
          
          Reviewed-on: https://go-review.googlesource.com/c/147442
      
      From-SVN: r265820
      Ian Lance Taylor committed
    • Fix sanitizer frame unwind on 32-bit ABIs (again) · b40a67df
      This re-applies r258525, and this time adds it to LOCAL_PATCHES.
      
      
      libsanitizer/
      	* LOCAL_PATCHES: Add r258525.
      	* sanitizer_common/sanitizer_stacktrace.cc
      	(BufferedStackTrace::FastUnwindStack): Use the correct frame offset
      	for PowerPC SYSV ABI.
      
      From-SVN: r265817
      Segher Boessenkool committed
    • target-supports.exp: Add check for "inf" effective target keyword. · 510e072d
      	* lib/target-supports.exp: Add check for "inf" effective target
      	keyword.
      	* gcc.dg/builtins-44.c: Skip if no infinite support.
      	* gcc.dg/builtins-45.c: Ditto.
      	* gcc.dg/torture/builtin-complex-1.c: Ditto.
      	* gcc.dg/torture/builtin-cproj-1.c: Ditto.
      	* gcc.dg/torture/builtin-frexp-1.c: Ditto.
      	* gcc.dg/torture/builtin-ldexp-1.c: Ditto.
      	* gcc.dg/torture/builtin-logb-1.c: Ditto.
      	* gcc.dg/torture/builtin-math-2.c: Ditto.
      	* gcc.dg/torture/builtin-math-5.c: Ditto.
      	* gcc.dg/torture/builtin-math-7.c: Ditto.
      	* gcc.dg/torture/builtin-modf-1.c: Ditto.
      	* gcc.dg/torture/type-generic-1.c: Ditto.
      
      From-SVN: r265816
      Paul Koning committed
    • sourcebuild.texi (target attributes): Document new "inf" effective target keyword. · 08500461
      	* doc/sourcebuild.texi (target attributes): Document new "inf"
      	effective target keyword.
      
      From-SVN: r265815
      Paul Koning committed
    • S/390: Increase register move costs for CC_REGS · b14dfa94
      This increases the move costs for moves involving the CC
      register which saves us some instructions in SPEC CPU2006.
      
      gcc/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* config/s390/s390.c (s390_register_move_cost): Increase costs for
              moves involving the CC reg.
      
      From-SVN: r265814
      Robin Dapp committed
    • S/390: Make tests expect column numbers in RTL output · d64d068c
      RTL output now includes column numbers in addition to line numbers,
      like this:
      
        "gcc/testsuite/gcc.target/s390/md/andc-splitter-1.c":16:1
      
      This confuses some S/390 tests.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-05  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* gcc.target/s390/md/andc-splitter-1.c: Add colon to
      	expectations.
      	* gcc.target/s390/md/andc-splitter-2.c: Likewise.
      	* gcc.target/s390/md/setmem_long-1.c: Likewise.
      
      From-SVN: r265813
      Ilya Leoshkevich committed
    • re PR tree-optimization/87873 (ICE: verify_gimple failed (error: incompatible… · 733441e2
      re PR tree-optimization/87873 (ICE: verify_gimple failed (error: incompatible types in PHI argument 0))
      
      2018-11-05  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/87873
      	* tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
      	argument.
      	* tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
      	* tree-vect-loop.c (vect_transform_loop): When splitting the
      	loop exit also create forwarder PHIs for constants.
      	* tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
      	Handle constant to_arg, add extra checking we match up the correct
      	PHIs.
      
      	* gcc.dg/pr87873.c: New testcase.
      
      From-SVN: r265812
      Richard Biener committed
    • Do not use %zu format in libcpp. · 546f678c
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* symtab.c (ht_dump_statistics): Replace %zu with %lu format.
      
      From-SVN: r265811
      Martin Liska committed
    • Fix printf call in symtab.c. · 037903cb
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* symtab.c (ht_dump_statistics): Fix format and
      	pass missing argument.
      
      From-SVN: r265810
      Martin Liska committed
    • S/390: Add loc patterns for QImode and HImode · d8928886
      This adds QImode and HImode support to load on condition.
      
      gcc/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* config/s390/s390.md: QImode and HImode for load on condition.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* gcc.target/s390/ifcvt-one-insn-bool.c: New test.
      	* gcc.target/s390/ifcvt-one-insn-char.c: New test.
      
      From-SVN: r265808
      Robin Dapp committed
    • S/390: Allow immediates in loc expander · 88e845c0
      This allows immediate operands for load on condition.
      
      gcc/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* config/s390/predicates.md: Fix typo.
      	* config/s390/s390.md: Allow immediates for load on condition.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
      
      	* gcc.dg/loop-8.c: On s390, always run the test with -march=zEC12.
      
      From-SVN: r265804
      Robin Dapp committed
    • Come up with SIZE_AMOUNT and use it in memory statistics and sort stats. · 40ce7fa6
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
      	* bitmap.h (struct bitmap_usage): Likewise.
      	* ggc-common.c (SCALE): Remove.
      	(LABEL): Likewise.
      	(struct ggc_usage): Use SIZE_AMOUNT. And update
      	compare method.
      	* ggc-page.c (SCALE): Remove.
      	(STAT_LABEL): Remove.
      	(ggc_print_statistics): Use SIZE_AMOUNT.
      	* gimple.h (SCALE): Remove.
      	(LABEL): Likewise.
      	* input.c (ONE_K): Remove.
      	(ONE_M): Likewise.
      	(SCALE): Likewise.
      	(STAT_LABEL): Likewise.
      	(FORMAT_AMOUNT): Likewise.
      	(dump_line_table_statistics): Use SIZE_AMOUNT.
      	* mem-stats.h (struct mem_usage): Likewise.
      	* rtl.c (dump_rtx_statistics): Likewise.
      	(rtx_alloc_counts): Change type to size_t.
      	(rtx_alloc_sizes): Likewise.
      	(rtx_count_cmp): New.
      	(dump_rtx_statistics): Sort first based on counts.
      	* tree.c (tree_nodes_cmp): New.
      	(tree_codes_cmp): New.
      	(dump_tree_statistics): Sort first based on counts.
      	* system.h (ONE_K): New.
      	(ONE_M): Likewise.
      	(SIZE_SCALE): Likewise.
      	(SIZE_LABEL): Likewise.
      	(SIZE_AMOUNT): Likewise.
      	* tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
      	* tree-dfa.c (dump_dfa_stats): Likewise.
      	* tree-phinodes.c (phinodes_print_statistics): Likewise.
      	* tree-ssanames.c (ssanames_print_statistics): Likewise.
      	* tree.c (dump_tree_statistics): Likewise.
      	* vec.c (struct vec_usage): Likewise.
      	* trans-mem.c (tm_mangle): Enlarge buffer in order to not
      	trigger a -Werror=format-overflow with
      	--enable-gather-detailed-stats.
      
      From-SVN: r265800
      Martin Liska committed
    • Fix vector memory statistics. · 00e6775a
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* mem-stats.h (mem_alloc_description::release_instance_overhead):
      	Return T *.
      	* vec.c (struct vec_usage): Register m_element_size.
      	(vec_prefix::register_overhead): New arguments: elements and
      	element_size.
      	(vec_prefix::release_overhead): Subtract elements.
      	* vec.h (struct vec_prefix): Change signature.
      	(va_heap::reserve): Pass proper arguments.
      	(va_heap::release): Likewise.
      
      From-SVN: r265799
      Martin Liska committed
    • Fix GNU coding style. · 93ef36dc
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
      	style.
      	* vec.c: Likewise.
      
      From-SVN: r265798
      Martin Liska committed
    • Fix string pool statistics. · 46aeb07f
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	* symtab.c (ht_dump_statistics): Make dump conditional
      	based on alloc_subobject.
      
      From-SVN: r265797
      Martin Liska committed
    • Fix build on sparc64-linux-gnu. · 6388cb29
      2018-11-05  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/87860
      	* sanitizer_common/sanitizer_linux.cc:  Cherry-pick upstream
      	r346129.
      
      From-SVN: r265796
      Martin Liska committed
    • tree-scalar-evolution.h (final_value_replacement_loop): Update prototype. · 4cc31a3c
      2018-11-05  Richard Biener  <rguenther@suse.de>
      
      	* tree-scalar-evolution.h (final_value_replacement_loop): Update
      	prototype.
      	* tree-scalar-evolution.c (final_value_replacement_loop): Return
      	whether anything was done.
      	(scev_const_prop): Remove constant propagation part, fold
      	remains into ...
      	* tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
      	(pass_data_scev_cprop): TODO_cleanup_cfg is now done
      	conditionally.
      
      	* gcc.dg/pr41488.c: Scan ivcanon dump instead of sccp one.
      	* gcc.dg/tree-ssa/scev-7.c: Likewise.
      
      From-SVN: r265795
      Richard Biener committed
    • re PR tree-optimization/87859 (store-merging miscompilation of mesa) · 18e0c3d1
      	PR tree-optimization/87859
      	* gimple-ssa-store-merging.c (struct merged_store_group): Add
      	only_constants and first_nonmergeable_order members.
      	(merged_store_group::merged_store_group): Initialize them.
      	(merged_store_group::do_merge): Clear only_constants member if
      	adding something other than INTEGER_CST store.
      	(imm_store_chain_info::coalesce_immediate_stores): Don't merge
      	stores with order >= first_nonmergeable_order.  Use
      	merged_store->only_constants instead of always recomputing it.
      	Set merged_store->first_nonmergeable_order if we've skipped any
      	stores.  Attempt to merge overlapping INTEGER_CST stores that
      	we would otherwise skip.
      
      	* gcc.dg/store_merging_24.c: New test.
      	* gcc.dg/store_merging_25.c: New test.
      
      From-SVN: r265794
      Jakub Jelinek committed
    • re PR sanitizer/87837 (-O2 -fsanitize=signed-integer-overflow misses overflows on x86-64) · cbd42900
      	PR sanitizer/87837
      	* match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
      
      	* c-c++-common/ubsan/pr87837.c: New test.
      
      From-SVN: r265793
      Jakub Jelinek committed
    • re PR target/87853 (_mm_cmpgt_epi8 broken with -funsigned-char) · 6db6445e
      2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
      
      	PR target/87853
      	* config/i386/emmintrin.h (__v16qs): New to cope with option
      	-funsigned-char.
      	(_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
      	(_mm_cmplt_epi8): Likewise.
      	(_mm_cmpgt_epi8): Likewise.
      
      From-SVN: r265792
      Xuepeng Guo committed
    • re PR middle-end/87852 (FAIL: gcc.c-torture/execute/pr53465.c) · 692e7e54
      2018-11-05  Richard Biener  <rguenther@suse.de>
      
      	PR rtl-optimization/87852
      	* fwprop.c (use_killed_between): Only consider single-defs of the
      	use whose definition statement dominates the use.
      
      From-SVN: r265791
      Richard Biener committed
    • Implement UDL changes from P0732R2. · b008f16b
      Implementing the UDL changes was pretty straightforward; I simplified
      cp_parser_userdef_string_literal using the releasing_vec type from mangle.c.
      
      While looking at this, I realized that the string UDL template taking a
      character pack that we implemented for C++14 didn't actually make it into
      C++14, so I've added a pedwarn for it and no longer suggest it in the
      diagnostic about an invalid UDL template.
      
      	* cp-tree.h (struct releasing_vec): Move from mangle.c.
      	Add get_ref method.
      	* parser.c (cp_parser_userdef_string_literal): Use it.  Handle
      	passing the string to a single template parameter of class type.
      	(cp_parser_template_declaration_after_parameters): Allow it.
      	Pedwarn about the character pack template that was proposed but not
      	accepted for C++14, and don't suggest it.
      
      From-SVN: r265790
      Jason Merrill committed
    • Implement P0732R2, class types in non-type template parameters. · 4be5c72c
      There is one significant piece of this that is not implemented yet: the
      reliance on defaulted operator<=>, which someone else has been working on.
      So, for the moment those lines are commented out of the testcases.
      
      One tricky bit was treating template parameters of classtype as const
      lvalues without making their decltype const; for this I used a
      VIEW_CONVERT_EXPR wrapper, which previously could only appear in templates
      as location wrappers.
      
      The user-defined literal parts of P0732R2 are in the next patch.
      
      gcc/cp/
      	* error.c (dump_simple_decl): Look through a template parm object.
      	* mangle.c (write_template_arg): Likewise.
      	(mangle_template_parm_object): New.
      	* pt.c (template_parm_object_p, get_template_parm_object): New.
      	(invalid_tparm_referent_p): Factor from convert_nontype_argument.
      	(convert_nontype_argument, invalid_nontype_parm_type_p): Handle
      	class-type template arguments.
      	* tree.c (lvalue_kind): Likewise.
      gcc/c-family/
      	* c-cppbuiltin.c (c_cpp_builtins): Add
      	__cpp_nontype_template_parameter_class.
      libiberty/
      	* cp-demangle.c (d_dump, d_make_comp, d_count_templates_scopes)
      	(d_print_comp_inner): Handle DEMANGLE_COMPONENT_TPARM_OBJ.
      	(d_special_name): Handle TA.
      	(d_expresion_1): Fix demangling of brace-enclosed initializer list.
      include/
      	* demangle.h (enum demangle_component_type): Add
      	DEMANGLE_COMPONENT_TPARM_OBJ.
      
      From-SVN: r265789
      Jason Merrill committed
    • Fix various latent issues revealed by P0732 work. · 5dab8b11
      The initialized_type hunk fixes handling of void AGGR_INIT_EXPRs that call a
      non-constructor; an AGGR_INIT_EXPR can have void type if its initialization
      semantics are more complicated than just expanding the call.
      
      The cxx_eval_vec_init_1 hunk corrects AGGR_INIT_EXPRs that were
      nonsensically built to initialize an object of void type.  And the
      build_aggr_init_expr hunk makes sure we don't do that again.
      
      The ocp_convert and cxx_eval_outermost_constant_expr hunks deal with making
      sure that a constant CONSTRUCTOR has the right type.
      
      	* cvt.c (ocp_convert): Don't wrap a CONSTRUCTOR in a NOP_EXPR.
      	* constexpr.c (initialized_type): Fix AGGR_INIT_EXPR handling.
      	(cxx_eval_vec_init_1): Correct type of AGGR_INIT_EXPR.
      	(cxx_eval_outermost_constant_expr): Make sure a CONSTRUCTOR has the
      	right type.  Don't wrap a CONSTRUCTOR if one was passed in.
      	* tree.c (build_aggr_init_expr): Check for void.
      
      From-SVN: r265788
      Jason Merrill committed
    • PR c++/60503 - wrong lambda attribute syntax. · c24c8a4b
      This patch fixes two issues with lambda attribute handling: First, it was in
      the wrong place in the grammar.  Second, it was treating attributes as
      applying to the whole declaration rather than to the function type, as
      specified by the standard.
      
      	* parser.c (cp_parser_lambda_declarator_opt): Fix attribute
      	handling.
      
      From-SVN: r265787
      Jason Merrill committed