1. 21 Feb, 2019 7 commits
  2. 20 Feb, 2019 25 commits
    • re PR middle-end/89412 (gcc ICE in simplify_subreg, at simplify-rtx.c:6273 on i686-linux-gnu) · 37d7267f
      	PR middle-end/89412
      	* expr.c (expand_assignment): If result is a MEM, use change_address
      	instead of simplify_gen_subreg.
      
      	* gcc.c-torture/compile/pr89412.c: New test.
      
      From-SVN: r269057
      Jakub Jelinek committed
    • re PR middle-end/89091 (ICE: Segmentation fault (in tree_class_check)) · cd56fb79
      	PR middle-end/89091
      	* fold-const.c (decode_field_reference): Return NULL_TREE if
      	lang_hooks.types.type_for_size returns NULL.  Check it before
      	overwriting *exp_.  Use return NULL_TREE instead of return 0.
      
      	* gcc.dg/torture/pr89091.c: New test.
      
      Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
      
      From-SVN: r269056
      Jakub Jelinek committed
    • re PR tree-optimization/88074 (g++ hangs on math expression) · b2d6c9e8
      	PR middle-end/88074
      	PR middle-end/89415
      	* toplev.c (do_compile): Double the emin/emax exponents to workaround
      	buggy mpc_norm.
      
      	* gcc.dg/pr88074-2.c: New test.
      
      From-SVN: r269055
      Jakub Jelinek committed
    • re PR target/89397 (ICE in build_call_expr_loc_array at gcc/tree.c:11563 since r229082) · c5a32f1a
      	PR target/89397
      	* config/i386/i386.c (ix86_atomic_assign_expand_fenv): Check
      	TARGET_SSE in addition to TARGET_SSE_MATH.
      
      	(ix86_excess_precision): Ditto.
      	(ix86_float_exceptions_rounding_supported_p): Ditto.
      	(use_rsqrt_p): Ditto.
      	* config/i386/sse.md (rsqrt<mode>2): Ditto.
      
      From-SVN: r269054
      Uros Bizjak committed
    • linux-unwind.h (alpha_fallback_frame_state): Cast 'mcontext_t *'… · 1ed28eda
      linux-unwind.h (alpha_fallback_frame_state): Cast 'mcontext_t *' &rt_->uc.uc_mcontext to 'struct sigcontext *'.
      
      	* config/alpha/linux-unwind.h (alpha_fallback_frame_state):
      	Cast 'mcontext_t *' &rt_->uc.uc_mcontext to 'struct sigcontext *'.
      
      From-SVN: r269053
      Uros Bizjak committed
    • re PR c++/89336 (internal compiler error when compiling a constexpr function) · ed4ec9ce
      	PR c++/89336
      	* constexpr.c (cxx_eval_store_expression): Diagnose changing of active
      	union member for -std=c++17 and earlier.
      
      	* g++.dg/cpp1y/constexpr-89336-3.C: New test.
      
      From-SVN: r269052
      Jakub Jelinek committed
    • Fix ICE with #line directive (PR c/89410) · 200a8e1a
      PR c/89410 reports various issues with #line directives with very
      large numbers; one of them is an ICE inside diagnostic-show-locus.c
      when emitting a diagnostic at line 0xffffffff.
      
      The issue is that the arithmetic in layout::calculate_line_spans to
      determine if two line spans are sufficiently close to consolidate
      was using the unsigned 32-bit linenum_type, which was overflowing
      when comparing the line for the expanded location with those of
      the location range (all on line 0xffffffff), leading to it
      erroneously adding two spans for the same line, leading to an
      assertion failure.
      
      This patch fixes the ICE by generalizing the use of long long in
      line-map.h's comparison function for linenum_type into a new
      linenum_arith_t typedef, and using it here.
      
      Doing so uncovered a second problem: the loop to print the lines
      within the line_span for this case is infinite: looping from
      0xfffffff upwards, overflowing to 0, and then never becoming
      greater than 0xfffffff.  The patch fixes this by using linenum_arith_t
      there also.
      
      gcc/ChangeLog:
      	PR c/89410
      	* diagnostic-show-locus.c (layout::calculate_line_spans): Use
      	linenum_arith_t when determining if two adjacent line spans are
      	close enough to merge.
      	(diagnostic_show_locus): Use linenum_arith_t when iterating over
      	lines within each line_span.
      
      gcc/testsuite/ChangeLog:
      	PR c/89410
      	* gcc.dg/pr89410-1.c: New test.
      	* gcc.dg/pr89410-2.c: New test.
      
      libcpp/ChangeLog:
      	PR c/89410
      	* include/line-map.h (linenum_arith_t): New typedef.
      	(compare): Use it.
      
      From-SVN: r269050
      David Malcolm committed
    • compiler: fix a typo in comments · b054705a
          
          Reviewed-on: https://go-review.googlesource.com/c/163097
      
      From-SVN: r269049
      Ian Lance Taylor committed
    • PR c++/87513 - 'sorry' mangling PMF template-id. · 60067b87
      Here build_offset_ref calls build_qualified_name to make a SCOPE_REF because
      the dependent template arguments make type_dependent_expression_p (member)
      true.  We could probably work hard to prevent this, but it doesn't seem
      necessary, and it's easy to fix write_expression to handle the result.
      
      	* mangle.c (write_expression): Handle SCOPE_REF to BASELINK.
      
      From-SVN: r269048
      Jason Merrill committed
    • * g++.old-deja/g++.robertl/eb92.C: Handle warning as well. · e3fe9cfb
      From-SVN: r269047
      Jason Merrill committed
    • PR c++/88380 - wrong-code with flexible array and NSDMI. · e0737c20
      Here 'skipped' was set to -1 to force an explicit initializer for 'uninit'
      before the initializer for 'initialized', and so we also tried to emit an
      explicit initializer for the flexible array, for which build_zero_init
      returns error_mark_node.  We should ignore flexarrays even when
      skipped < 0.
      
      	* typeck2.c (process_init_constructor_record): Skip flexarrays.
      
      From-SVN: r269046
      Jason Merrill committed
    • PR c++/88572 - wrong handling of braces on scalar init. · cb133085
      	* decl.c (reshape_init_r): Allow braces around scalar initializer
      	within aggregate init.  Reject double braced-init of scalar
      	variable.
      
      From-SVN: r269045
      Will Wray committed
    • target-supports.exp (check_effective_target_vect_usad_char): Add PowerPC support. · 990525f6
      	* lib/target-supports.exp (check_effective_target_vect_usad_char):
      	Add PowerPC support.
      	* gcc.dg/vect/slp-reduc-sad.c: Update scan string.
      	* gcc.dg/vect/vect-reduc-sad.c: Likewise.
      
      From-SVN: r269043
      Pat Haugen committed
    • libsanitizer: Restore internal_readlink for x32 · 4dfc5b35
      Cherry-pick compiler-rt revision 354451:
      
      r316591 has
      
      @@ -389,13 +383,11 @@ uptr internal_dup2(int oldfd, int newfd) {
       }
      
       uptr internal_readlink(const char *path, char *buf, uptr bufsize) {
      -#if SANITIZER_NETBSD
      -  return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize);
      -#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
      +#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
         return internal_syscall(SYSCALL(readlinkat), AT_FDCWD,
                                 (uptr)path, (uptr)buf, bufsize);
       #else
      -  return internal_syscall(SYSCALL(readlink), (uptr)path, (uptr)buf, bufsize);
      +  return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize);
       #endif
       }
      
      which dropped the (uptr) cast and broke x32.  This patch puts back the
      (uptr) cast to restore x32 and fixes:
      
      https://bugs.llvm.org/show_bug.cgi?id=40783
      
      Differential Revision: https://reviews.llvm.org/D58413
      
      	PR sanitizer/89409
      	* sanitizer_common/sanitizer_linux.cc (internal_readlink):
      	Cherry-pick compiler-rt r354451.
      
      From-SVN: r269042
      H.J. Lu committed
    • Fix testsuite · 9e8fc96c
      2019-02-19  Caroline Tice <cmtice@google.com>
      
      	Fix testsuite
      	* testsuite/libvtv.cc/const_vtable.cc (main): Fix function signature.
      
      From-SVN: r269041
      Caroline Tice committed
    • revert: re PR target/89397 (ICE in build_call_expr_loc_array at gcc/tree.c:11563 since r229082) · 0024731f
      Revert:
              PR target/89397
              * config/i386/i386.c (ix86_option_override_internal): Set
              opts->x_ix86_fpmath to FPMATH_387 when SSE is disabled.
      
              gcc/testsuite/
      
              PR target/89397
              * gcc.target/i386/pr89397.c: New test.
      
      From-SVN: r269040
      Uros Bizjak committed
    • [GCC] PR target/86487: fix the way 'uses_hard_regs_p' handles paradoxical · 145d4e1a
      subregs
      
      gcc/ChangeLog:
      2019-02-20 Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	PR target/86487
      	* lra-constraints.c(uses_hard_regs_p): Fix handling of
      	paradoxical SUBREGS.
      
      gcc/testsuite/ChangeLog:
      2019-02-20 Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	PR target/86487
      	* gcc.target/arm/pr86487.c: New.
      
      From-SVN: r269039
      Andre Vieira committed
    • Change singular to plural in gfortran.texi. · c9ea5b63
      2019-02-20  Martin Liska  <mliska@suse.cz>
      
      	* gfortran.texi: Change singular to plural.
      
      From-SVN: r269038
      Martin Liska committed
    • re PR c++/84536 (ICE with non-type template parameter) · 9ccdc43d
      /cp
      2019-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/84536
      	* pt.c (tsubst_init): Diagnose an initializer expanding to an
      	empty list of expressions; tweak wrt dependent types.
      	(regenerate_decl_from_template): For VAR_DECLs call tsubst_init
      	instead of tsubst_expr.
      
      /testsuite
      2019-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/84536
      	* g++.dg/cpp1y/var-templ60.C: New.
      
      From-SVN: r269037
      Paolo Carlini committed
    • Correction of ChangeLog entry, Thomas provided the code for this change. · 54603edc
      2019-02-19  Thomas Schwinge  <thomas@codesourcery.com>
      
      	PR c/87924
      	* openmp.c (gfc_match_omp_clauses): Add representation of wait clause
      	without argument as 'wait (GOMP_ASYNC_NOVAL)'.
      
      From-SVN: r269036
      Thomas Schwinge committed
    • Document Fortran header directive. · 7ac75976
      2019-02-20  Martin Liska  <mliska@suse.cz>
      
      	* gfortran.texi: Document Fortran header directive.
      
      From-SVN: r269035
      Martin Liska committed
    • re PR libstdc++/89402 (warning: ‘void _ZNKSt4hashIeEclEe()’ specifies less… · ea1c2a95
      re PR libstdc++/89402 (warning: ‘void _ZNKSt4hashIeEclEe()’ specifies less restrictive attribute than its target)
      
      	PR libstdc++/89402
      	* src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
      	_GLIBCXX_PURE to the alias declaration.
      
      From-SVN: r269034
      Jakub Jelinek committed
    • [rs6000] fix PR 88100, range check for vec_splat_{su}{8,16,32} · e86ae7ba
      GCC revision 259524 implemented range check for the vec_splat_{su}{8,16,32}
      builtins.  However, as a consequence of the implementation, the range check
      is not done correctly for the expected vspltis[bhw] instructions.  The result
      is that we may not get a valid error message if the valid range of the data
      is exceeded.
      
      Although the input of the function prototype of vec_splat_{su}{8,16,32} is
      const int, the actual data usage range is limited to the data range of 5 bits
      signed.  We should limit the int_cst.val[0] data to the 5 bit signed data range
      without any modification in the input arg0 parameter.  However, the sext_hwi
      function intercepts the data of TREE_INT_CST_LOW (arg0) as size bits in the
      sext_hwi (TREE_INT_CST_LOW (arg0), size) statement.  This will cause some of
      the excess data to fall within the range of 5 bits signed, so that the correct
      diagnostic information cannot be generated, we need to remove the sext_hwi to
      ensure that the input data has not been modified.
      
      This patch fix range check for the vec_splat_s[8,16,32] builtins.  The argument
      must be a 5-bit const int as specified for the vspltis[bhw] instructions.
      
      for gcc/ChangeLog
      
      	PR target/88100
      	* gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin)
      	<case ALTIVEC_BUILTIN_VSPLTISB, ALTIVEC_BUILTIN_VSPLTISH,
      	ALTIVEC_BUILTIN_VSPLTISW>: Don't convert the operand before
      	range checking it.
      
      for gcc/testsuite/ChangeLog
      
      	PR target/88100
      	* gcc/testsuite/gcc.target/powerpc/pr88100.c: New testcase.
      
      From-SVN: r269033
      Li Jia He committed
    • PR c++/88368 - wrong 'use of deleted function' · 9d35a27a
      Since my patch for 81359 allowed us to signal failure on return from
      maybe_instantiate_noexcept, we no longer need to turn an error into
      noexcept(false).  We also need to handle NSDMI instantiation errors under
      synthesized_method_walk.  This change caused some instantiation context
      notes to be lost in the testsuite, so I added push_tinst_level to
      get_defaulted_eh_spec to restore that context.
      
      	* method.c (walk_field_subobs): Remember errors from get_nsdmi.
      	(get_defaulted_eh_spec): Call push_tinst_level.
      	* pt.c (maybe_instantiate_noexcept): Keep error_mark_node.
      	* typeck2.c (merge_exception_specifiers): Handle error_mark_node.
      
      From-SVN: r269032
      Jason Merrill committed
    • Daily bump. · 8dca1dc3
      From-SVN: r269031
      GCC Administrator committed
  3. 19 Feb, 2019 8 commits