1. 20 May, 2020 1 commit
  2. 19 May, 2020 4 commits
  3. 18 May, 2020 4 commits
    • PR middle-end/94940 - spurious -Warray-bounds for a zero length array member of union · ff61c5bd
      gcc/testsuite/ChangeLog:
      
      	PR middle-end/94940
      	* gcc.dg/Warray-bounds-61.c: New test.
      
      gcc/ChangeLog:
      
      	PR middle-end/94940
      	* tree-vrp.c (vrp_prop::check_mem_ref): Remove unreachable code.
      	* tree.c (component_ref_size): Correct the handling or array members
      	of unions.
      	Drop a pointless test.
      	Rename a local variable.
      Martin Sebor committed
    • Update gcc sv.po. · e9bfb06b
      	* sv.po: Update.
      Joseph Myers committed
    • Require powerpc_vsx_ok in gcc.target/powerpc/pr71763.c · b761035f
      We're getting an error when running this test on PowerPC VxWorks 7,
      due to an unexpected warning:
      
          | Excess errors:
          | cc1: warning: '-mvsx' and '-mno-altivec' are incompatible
      
      The warning comes from a combination of factors:
        - The test itself uses -mvsx explicitly via the following directive:
             // { dg-options "-O1 -mvsx" }
        - Our toolchain was configured so as to make -mno-altivec
          the default;
        - These two options are mutually exclusive.
      
      This commit adds a powerpc_vsx_ok dg-require-effective-target directive
      to that test, and thus making it UNSUPPORTED instead.
      
      Tested on PowerPC VxWorks 7. Also tested on PowerPC ELF as well,
      a platform where we do not make -mno-altivec the default, to verify
      that the test continues to run as usual in that case.
      
      gcc/testsuite/
      
              * gcc.target/powerpc/pr71763.c: Require powerpc_vsx_ok.
      
      (cherry picked from commit c917584aa9ec32934acf0082ed383b04f49fd174)
      Douglas Rupp committed
    • Daily bump. · c70e1174
      GCC Administrator committed
  4. 17 May, 2020 3 commits
    • libphobos: Backport library fixes from mainline · 999c80ac
      - core.cpuid has been fixed to not use i7 detection on AMD processors.
      - std.net.curl has been fixed to correctly handle HTTP/2 status lines.
      - std.zip has had a test fixed to not rely on unzip being installed.
      
      libphobos/ChangeLog:
      
      	PR d/95166
      	* libdruntime/core/cpuid.d (cpuidX86): Do not use i7 detection on AMD
      	processors.
      	(hasCPUID): Fix deprecated asm syntax.
      
      	PR d/95167
      	* src/std/zip.d (unittest): Skip test if unzip is not installed.
      
      	PR d/95168
      	* src/std/net/curl.d (HTTP.onReceiveHeader): Move status line parsing
      	to ...
      	(HTTP.parseStatusLine): ... here.  New function.  Add support for
      	parsing HTTP/2 status lines.
      Iain Buclaw committed
    • d: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959 · 79f2ae6e
      Both array concat and array new expressions wrapped any temporaries
      created into a BIND_EXPR.  This does not work if an expression used to
      construct the result requires scope destruction, which is represented by
      a TARGET_EXPR with a clean-up, and a CLEANUP_POINT_EXPR at the
      location where the temporaries logically go out of scope.  The reason
      for this not working is because the lowering of cleanup point
      expressions does not traverse inside BIND_EXPRs to expand any gimple
      cleanup expressions within.
      
      The use of creating BIND_EXPR has been removed at both locations, and
      replaced with a normal temporary variable that has initialization
      delayed until its address is taken.
      
      gcc/d/ChangeLog:
      
      	PR d/94970
      	* d-codegen.cc (force_target_expr): Move create_temporary_var
      	implementation inline here.
      	(create_temporary_var): Remove.
      	(maybe_temporary_var): Remove.
      	(bind_expr): Remove.
      	* d-convert.cc (d_array_convert): Use build_local_temp to generate
      	temporaries, and generate its assignment.
      	* d-tree.h (create_temporary_var): Remove.
      	(maybe_temporary_var): Remove.
      	(d_array_convert): Remove vars argument.
      	* expr.cc (ExprVisitor::visit (CatExp *)): Use build_local_temp to
      	generate temporaries, don't wrap them in a BIND_EXPR.
      	(ExprVisitor::visit (NewExp *)): Likewise.
      
      gcc/testsuite/ChangeLog:
      
      	PR d/94970
      	* gdc.dg/pr94970.d: New test.
      Iain Buclaw committed
    • Daily bump. · bc709bc9
      GCC Administrator committed
  5. 16 May, 2020 1 commit
  6. 15 May, 2020 2 commits
  7. 14 May, 2020 1 commit
  8. 13 May, 2020 5 commits
    • Fortran : ICE in gfc_conv_array_constructor_expr PR93497 · f2b77b92
      Invalid expressions, such as those involving array constructors,
      used for the length of character types will cause an ICE.
      
      2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      Backported from master
      2020-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      gcc/fortran/
      
      	PR fortran/93497
      	* decl.c (char_len_param_value): Check whether character
      	length expression is of type EXPR_OP and if so simplify it.
      	* resolve.c (resolve_charlen): Reject length if it has a
      	rank.
      
      2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      Backported from master
      2020-05-13  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      gcc/testsuite/
      
      	PR fortran/93497
      	* gfortran.dg/pr88025.f90: Change in wording of error.
      	* gfortran.dg/pr93497.f90: New test.
      	* gfortran.dg/pr93714_1.f90: Change in wording of errors.
      	* gfortran.dg/pr93714_2.f90: Change in wording of errors.
      Mark Eggleston committed
    • ipa/94947 - avoid using externally_visible_p () · a68d4b47
      externally_visible_p wasn't the correct predicate to use (even if it
      worked), instead we should use DECL_EXTERNAL || TREE_PUBLIC.
      
      2020-05-07  Richard Biener  <rguenther@suse.de>
      
      	PR ipa/94947
      	* tree-ssa-structalias.c (refered_from_nonlocal_fn): Use
      	DECL_EXTERNAL || TREE_PUBLIC instead of externally_visible.
      	(refered_from_nonlocal_var): Likewise.
      	(ipa_pta_execute): Likewise.
      Richard Biener committed
    • ipa/94947 - fix test for externally visible variables for IPA PTA · 67d00c43
      This fixes lack of an escape point of externally declared variables.
      
      2020-05-05  Richard Biener  <rguenther@suse.de>
      
      	PR ipa/94947
      	* tree-ssa-structalias.c (ipa_pta_execute): Use
      	varpool_node::externally_visible_p ().
      	(refered_from_nonlocal_var): Likewise.
      
      	* gcc.dg/torture/pr94947-1.c: New testcase.
      	* gcc.dg/torture/pr94947-2.c: Likewise.
      Richard Biener committed
    • testsuite/92177 - adjust expected patterns for gcc.dg/vect/bb-slp-22.c · ff9d4e09
      We now always vectorize two BBs, adjust the selector to also scan
      for integer multiplication vectorization explicitely.
      
      2020-05-05  Richard Biener  <rguenther@suse.de>
      
      	PR testsuite/92177
      	* gcc.dg/vect/bb-slp-22.c: Adjust.
      Richard Biener committed
    • Daily bump. · d7ff81e0
      GCC Administrator committed
  9. 12 May, 2020 6 commits
    • rs6000: AIX long double builtins for 64 bit long double. · 0d2cd7aa
      When long doubles are 64 bit, the AIX C library overrides the definitions
      but GCC builtins point to 128 bit names.  This patch overrides the
      builtins for fmodl, frexpl, ldexpl and modfl to refer to the 64 bit symbols.
      
      Backport from mainline
      2020-05-04  Clement Chigot  <clement.chigot@atos.net>
      	    David Edelsohn  <dje.gcc@gmail.com>
      
      	* config/rs6000/rs6000-call.c (rs6000_init_builtins): Override explicit
      	for fmodl, frexpl, ldexpl and modfl builtins.
      David Edelsohn committed
    • [Fortran] Fix/modify present() handling for assumed-shape optional (PR 94672) · 8aeffc4c
      gcc/fortran/
      2020-05-12  Tobias Burnus  <tobias@codesourcery.com>
      
      	Backported from mainline
      	2020-05-11  Tobias Burnus  <tobias@codesourcery.com>
      
      	PR fortran/94672
      	* trans.h (gfc_conv_expr_present): Add use_saved_decl=false argument.
      	* trans-expr.c (gfc_conv_expr_present): Likewise; use DECL directly
      	and only if use_saved_decl is true, use the actual PARAM_DECL arg (saved
      	descriptor).
      	* trans-array.c (gfc_trans_dummy_array_bias): Set local 'arg.0'
      	variable to NULL if 'arg' is not present.
      	* trans-openmp.c (gfc_omp_check_optional_argument): Simplify by checking
      	'arg.0' instead of the true PARM_DECL.
      	(gfc_omp_finish_clause): Remove setting 'arg.0' to NULL.
      
      gcc/testsuite/
      2020-05-12  Tobias Burnus  <tobias@codesourcery.com>
      
      	Backported from mainline
      	2020-05-11  Jakub Jelinek  <jakub@redhat.com>
      		    Tobias Burnus  <tobias@codesourcery.com>
      
      	PR fortran/94672
      	* gfortran.dg/gomp/pr94672.f90: New.
      	* gfortran.dg/missing_optional_dummy_6a.f90: Update scan-tree.
      Tobias Burnus committed
    • libstdc++: Fix incorrect size calculation in PMR resource (PR 94906) · dc103060
      Calculating the size of a chunk being returned to the upstream allocator
      was done with a 32-bit type, so it wrapped if the chunk was 4GB or
      larger.
      
      I don't know how to test this without allocating 4GB, so there's no test
      in the testsuite. It has been tested manually of course.
      
      Backport from mainline
      2020-05-04  Jonathan Wakely  <jwakely@redhat.com>
      
      	PR libstdc++/94906
      	* src/c++17/memory_resource.cc
      	(monotonic_buffer_resource::_Chunk::release): Use size_t for shift
      	operands.
      Jonathan Wakely committed
    • libstdc++: Make byte-sized std::fill_n a constant expression (PR 94933) · 8836c35d
      The overload for byte types uses memset and isn't constexpr. This adds
      the specifier and uses std::is_constant_evaluated() to provide a
      compile-time alternative.
      
      Backport from mainline
      2020-05-03  Jonathan Wakely  <jwakely@redhat.com>
      
      	PR libstdc++/94933
      	* include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
      	usable in constant expressions.
      	* testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
      	non-scalars.
      Jonathan Wakely committed
    • syscall: append to environment in tests, don't clobber it · fbfa806e
      This is a partial backport of https://golang.org/cl/233318.
      It's only a partial backport because part of the change was
      already applied to libgo in CL 193497 as part of the update
      to the Go 1.13beta1 release.
      
      Fixes PR go/95061
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233359
      Ian Lance Taylor committed
    • Daily bump. · 15a38f49
      GCC Administrator committed
  10. 11 May, 2020 5 commits
    • Update gcc .po files. · 5255b2da
      	* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
      	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
      	zh_TW.po: Update.
      Joseph Myers committed
    • Fortran : Spurious warning message with -Wsurprising PR59107 · 2653784e
      This change is from a patch developed for gcc-5.  The code
      has moved on since then requiring a change to interface.c
      
      2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      Backported from mainline
      2020-05-11  Janus Weil  <janus@gcc.gnu.org>
      	    Dominique d'Humieres  <dominiq@lps.ens.fr>
      
      gcc/fortran/
      
      	PR fortran/59107
      	* gfortran.h: Rename field resolved as resolve_symbol_called
      	and assign two 2 bits instead of 1.
      	* interface.c (check_dtio_interface1): Use new field name.
      	(gfc_find_typebound_dtio_proc): Use new field name.
      	* resolve.c (gfc_resolve_intrinsic): Replace check of the formal
      	field with resolve_symbol_called is at least 2, if it is not
      	set the field to 2.  (resolve_typebound_procedure): Use new field
      	name.  (resolve_symbol): Use new field name and check whether it
      	is at least 1, if it is not set the field to 1.
      
      Backported from mainline
      2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      gcc/testsuite/
      
      	PR fortran/59107
      	* gfortran.dg/pr59107.f90: New test.
      Mark Eggleston committed
    • RTEMS: Improve GCC specification · 0eb6021c
      Add a start/end file specification if the -qrtems option is present.
      Allow targets to customize it.
      
      Support the standard -nodefaultlibs option.
      
      gcc/
      
      	* config/rtems.h (RTEMS_STARTFILE_SPEC): Define if undefined.
      	(RTEMS_ENDFILE_SPEC): Likewise.
      	(STARTFILE_SPEC): Update comment.  Add RTEMS_STARTFILE_SPEC.
      	(ENDFILE_SPEC): Add RTEMS_ENDFILE_SPEC.
      	(LIB_SPECS): Support -nodefaultlibs option.
      	* config/or1k/rtems.h (RTEMS_STARTFILE_SPEC): Define.
      	(RTEMS_ENDFILE_SPEC): Likewise.
      	* config/rs6000/rtems.h (RTEMS_STARTFILE_SPEC): Likewise.
      	(RTEMS_ENDFILE_SPEC): Likewise.
      	* config/v850/rtems.h (RTEMS_STARTFILE_SPEC): Likewise.
      	(RTEMS_ENDFILE_SPEC): Likewise.
      Sebastian Huber committed
    • Fix typo in fprofile-prefix-path. · 340c711b
      	Backport from mainline
      	2020-05-11  Martin Liska  <mliska@suse.cz>
      
      	PR c/95040
      	* common.opt: Fix typo in option description.
      Martin Liska committed
    • Daily bump. · 94c98e1f
      GCC Administrator committed
  11. 10 May, 2020 2 commits
    • coroutines: Update TREE_SIDE_EFFECTS on inserted bind exprs. · f09d8982
      There are several places where we insert bind expressions while
      making the coroutine AST transforms.  These should be marked as
      having side-effects where relevant, which had been omitted.  This
      leads to at least one failure in the cppcoros test suite, where a loop
      body is dropped in gimplification because it is not marked.
      
      gcc/cp/ChangeLog:
      
      2020-05-10  Iain Sandoe  <iain@sandoe.co.uk>
      
      	Backported from mainline
      	2020-05-08  Iain Sandoe  <iain@sandoe.co.uk>
      
      	PR c++/95003
      	* coroutines.cc (build_actor_fn): Ensure that bind scopes
      	are marked as having side-effects where necessary.
      	(replace_statement_captures): Likewise.
      	(morph_fn_to_coro): Likewise.
      
      gcc/testsuite/ChangeLog:
      
      2020-05-10  Iain Sandoe  <iain@sandoe.co.uk>
      
      	Backported from mainline
      	2020-05-08  Iain Sandoe  <iain@sandoe.co.uk>
      
      	PR c++/95003
      	* g++.dg/coroutines/torture/pr95003.C: New test.
      Iain Sandoe committed
    • Daily bump. · 6a054393
      GCC Administrator committed
  12. 09 May, 2020 1 commit
  13. 08 May, 2020 3 commits
    • c++: Parenthesized-init of aggregates accepts invalid code [PR94885] · ceae6a13
      Here we have (conceptually *) something like
      
        struct B { };
        struct D : B { };
        D(0); // invalid
      
      and in C++20 the ()-initialization has created a { 0 } constructor that
      it tries to initialize an object of type D with.  We should reject
      initializing an object of type B from 0, but we wrongly accept it because
      process_init_constructor_record skips initializers for empty bases/fields:
             if (DECL_SIZE (field) && integer_zerop (DECL_SIZE (field))
                 && !TREE_SIDE_EFFECTS (next))
               /* Don't add trivial initialization of an empty base/field to the
                  constructor, as they might not be ordered the way the back-end
                  expects.  */
               continue;
      but here 'next' was error_mark_node, returned by massage_elt_init, so we
      wound up with { } which would validly value-initialize the object.
      
      [*] Usually digest_init in build_new_method_call_1 would detect this,
      but in this case the instance is is_dummy_object and we don't call
      digest just yet.
      
              PR c++/94885
              * typeck2.c (process_init_constructor_record): Return PICFLAG_ERRONEOUS
              if an initializer element was erroneous.
      
              * g++.dg/cpp2a/paren-init26.C: New test.
      Marek Polacek committed
    • tree: Avoid variable sharing in get_narrower [PR94724] · 3a296f32
      On Thu, May 07, 2020 at 02:45:29PM +0200, Thomas Schwinge wrote:
      > >>+      for (tree op = win; TREE_CODE (op) == COMPOUND_EXPR;
      >
      > ..., and new 'op' variable here.
      >
      > >>+        op = TREE_OPERAND (op, 1))
      > >>+     v.safe_push (op);
      > >>+      FOR_EACH_VEC_ELT_REVERSE (v, i, op)
      > >>+     ret = build2_loc (EXPR_LOCATION (op), COMPOUND_EXPR,
      > >>+                       TREE_TYPE (win), TREE_OPERAND (op, 0),
      > >>+                       ret);
      > >>+      return ret;
      > >>     }
      > >>   while (TREE_CODE (op) == NOP_EXPR)
      > >>     {
      
      There is no reason for the shadowing and op at this point acts as a
      temporary and will be overwritten in FOR_EACH_VEC_ELT_REVERSE anyway.
      So, we can just s/tree // here.
      
      2020-05-08  Jakub Jelinek  <jakub@redhat.com>
      
      	PR middle-end/94724
      	* tree.c (get_narrower): Reuse the op temporary instead of
      	shadowing it.
      Jakub Jelinek committed
    • Daily bump. · 48f3d4eb
      GCC Administrator committed
  14. 07 May, 2020 2 commits
    • libstdc++: Replace deduced return type in ranges::iter_move (PR 92894) · 6fedf28c
      The deduced return type causes the instantiation of the function body,
      which can then require the instantiation of std::projected::operator*
      which is intentionally not defined.
      
      This patch uses a helper trait to define the return type, so that the
      function body doesn't need to be instantiated.
      
      Unlike on the master branch, this backport to gcc-10 does not change the
      iter_rvalue_reference_t alias template and __indirectly_readable_impl
      concept to use the new trait.
      
      Backport from mainline
      2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
      	    Patrick Palka  <ppalka@redhat.com>
      
      	PR libstdc++/92894
      	* include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
      	Add trait to determine return type and an alias for it.
      	(ranges::__cust_imove::_IMove::operator()): Use __result instead of
      	deduced return type.
      	* testsuite/24_iterators/customization_points/92894.cc: New test.
      	* testsuite/24_iterators/indirect_callable/92894.cc: New test.
      
      Co-authored-by: Patrick Palka <ppalka@redhat.com>
      Jonathan Wakely committed
    • c++: ICE in value_dependent_expression_p in C++98 mode [PR94938] · e5613c55
      Here we ICE with -std=c++98 since the newly added call to uses_template_parms
      (r10-6357): we hit
      26530             gcc_assert (cxx_dialect >= cxx11
      26531                         || INTEGRAL_OR_ENUMERATION_TYPE_P (type));
      and TYPE is a record type.  The problem is that the argument to
      value_dependent_expression_p does not satisfy potential_constant_expression
      which it must, as the comment explains.  I thought about fixing this in
      uses_template_parms -- only call v_d_e_p if p_c_e is true, but in this
      case we want to also suppress the warnings if we don't have a constant
      expression.  I couldn't simply check TREE_CONSTANT as in
      compute_array_index_type_loc, because then we'd stop warning in the new
      Wtype-limits3.C test.
      
      Fixed by using type_dependent_expression_p_push instead.  This means
      that we won't suppress the warnings for value-dependent expressions that
      aren't type-dependent, e.g. sizeof (T).  This only seems to make a
      difference for -Wdiv-by-zero, now tested in Wdiv-by-zero-3.C, where I
      think it's reasonable to warn.  It could make -Wtautological-compare
      warn more, but that warning doesn't trigger when it gets constant arguments.
      Wtype-limits4.C is a test reduced from poly-int.h and it tests a scenario
      that was missing in our testsuite.
      
      This patch also moves the warning_sentinels after the RECURs -- we mean
      to use them for build_x_binary_op purposes only.
      
              PR c++/94938
              * pt.c (tsubst_copy_and_build): Call type_dependent_expression_p_push
              instead of uses_template_parms.  Move the warning_sentinels after the
              RECURs.
      
              * g++.dg/warn/Wdiv-by-zero-3.C: New test.
              * g++.dg/warn/Wtype-limits4.C: New test.
              * g++.dg/warn/template-2.C: New test.
              * g++.old-deja/g++.pt/crash10.C: Add dg-warning.
      Marek Polacek committed