1. 12 May, 2020 3 commits
  2. 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
  3. 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
  4. 09 May, 2020 1 commit
  5. 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
  6. 07 May, 2020 18 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
    • alpha: Implement the PR94780 fix for alpha. · 9a993849
      Essentially the same fix as for x86.
      
      2020-05-07  Uroš Bizjak  <ubizjak@gmail.com>
      
      gcc/
      	* config/alpha/alpha.c (alpha_atomic_assign_expand_fenv): Use
      	TARGET_EXPR instead of MODIFY_EXPR for the first assignments to
      	fenv_var and new_fenv_var.
      Uros Bizjak committed
    • Fix optindex entries for 2 options. · 71e815a5
      	Backport from mainline
      	2020-05-07  Martin Liska  <mliska@suse.cz>
      
      	* doc/invoke.texi: Fix 2 optindex entries.
      Martin Liska committed
    • testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946] · dd38686d
      The testcase in the current form doesn't FAIL without the patch on
      x86_64-linux unless also testing with -m32; as that the 64-bit testing
      on that target is probably way more common, and we can use also attributes
      that FAIL without the patch with -m64, the following patch adjusts the
      test, so that it FAILs without the patch for both -m64 and -m32 (but not
      -mx32) and PASSes with the patch.
      
      2020-05-07  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/94946
      	* g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use
      	sysv_abi and ms_abi attributes in that case instead of fastcall and
      	no attribute.
      Jakub Jelinek committed
    • c-family: Fix error-recovery ICE on __builtin_speculation_safe_value [PR94968] · da91f9d2
      If the second argument of __builtin_speculation_safe_value is
      error_mark_node (or has such a type), we ICE during
      useless_typ_conversion_p.
      
      202-05-07  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c/94968
      	* c-common.c (speculation_safe_value_resolve_params): Return false if
      	error_operand_p (val2).
      	(resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
      	Remove extraneous semicolon.
      
      	* gcc.dg/pr94968.c: New test.
      Jakub Jelinek committed
    • c++: Avoid strict_aliasing_warning on dependent types or expressions [PR94951] · d82414eb
      The following testcase gets a bogus warning during build_base_path,
      when cp_build_indirect_ref* calls strict_aliasing_warning with a dependent
      expression.  IMHO calling get_alias_set etc. on dependent types feels wrong
      to me, we should just defer the warnings in those cases until instantiation
      and only handle the cases where neither type nor expr are dependent.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/94951
      	* typeck.c (cp_strict_aliasing_warning): New function.
      	(cp_build_indirect_ref_1, build_reinterpret_cast_1): Use
      	it instead of strict_aliasing_warning.
      
      	* g++.dg/warn/Wstrict-aliasing-bogus-tmpl.C: New test.
      Jakub Jelinek committed
    • c++: Don't synthesize sfk_comparison method multiple times [PR94907] · 3d4c7e05
      On the following testcase we ICE, because synthesize_method is called twice
      on the same sfk_comparison method fndecl, the first time it works fine
      because start_preparsed_function in that case sets both
      current_function_decl and cfun, but second time it is called it only sets
      the former and keeps cfun NULL, so we ICE when trying to store
      current_function_returns_value.
      I think it is just wrong to call synthesize_method multiple times, and most
      synthesize_method callers avoid that by not calling it if DECL_INITIAL is
      already set, so this patch does that too.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/94907
      	* method.c (defaulted_late_check): Don't call synthesize_method
      	on constexpr sfk_comparison if it has been called on it already.
      
      	* g++.dg/cpp2a/spaceship-synth8.C: New test.
      Jakub Jelinek committed
    • riscv: Fix up riscv_atomic_assign_expand_fenv [PR94950] · 5454a13a
      Similarly to the fixes on many other targets, riscv needs to use TARGET_EXPR
      to avoid having the create_tmp_var_raw temporaries without proper DECL_CONTEXT
      and not mentioned in local decls.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/94950
      	* config/riscv/riscv-builtins.c (riscv_atomic_assign_expand_fenv): Use
      	TARGET_EXPR instead of MODIFY_EXPR for first assignment to old_flags.
      Jakub Jelinek committed
    • combine: Don't replace SET_SRC with REG_EQUAL note content if SET_SRC has side-effects [PR94873] · 8982e39b
      There were some discussions about whether REG_EQUAL notes are valid on insns with a single
      set which contains auto-inc-dec side-effects in the SET_SRC and the majority thinks that
      it should be valid.  So, this patch fixes the combiner to punt in that case, because otherwise
      the auto-inc-dec side-effects from the SET_SRC are lost.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR rtl-optimization/94873
      	* combine.c (combine_instructions): Don't optimize using REG_EQUAL
      	note if SET_SRC (set) has side-effects.
      
      	* gcc.dg/pr94873.c: New test.
      Jakub Jelinek committed
    • x86: Fix *vec_dupv4hi constraints [PR94942] · 1b53c116
      This insn and split splits into HI->V?HImode broadcast for avx2 and later,
      but either the operands need to be %xmm0-%xmm15 (i.e. VEX encoded insn), or
      the insn needs both AVX512BW and AVX512VL.
      Now, Yv constraint is v for AVX512VL and x otherwise, so for -mavx512vl -mno-avx512bw
      we ICE if we end up with a %xmm16+ register from RA.
      Yw constraint is v for AVX512VL and AVX512BW and nothing otherwise, so
      in this pattern we actually need xYw.
      
      2020-05-05  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/94942
      	* config/i386/mmx.md (*vec_dupv4hi): Use xYw constraints instead of Yv.
      
      	* gcc.target/i386/pr94942.c: New test.
      Jakub Jelinek committed
    • diagnostics: get_option_html_page fixes · a764bbb7
      While testing the --with-documentation-root-url= changes, I run into
      [Wreturn-type] URL pointing to gfortran documentation where it obviously
      isn't documented.  The following patch updates the list of options to match
      reality (on the other side -Wconversion-extra is gfortran only option
      documented in gfortran.texi).
      
      Or, perhaps better use the attached patch instead, which doesn't have a
      hardcoded list and instead uses the flags?  I went through options.c
      and the updated list of options matches exactly the cases where CL_Fortran
      is set for "-W*" options together with CL_C and/or CL_CXX (ok, there is also
      -Wall and -Wextra, but hopefully we don't emit [Wall] or [Wextra] for
      anything).
      
      2020-05-04  Jakub Jelinek  <jakub@redhat.com>
      
      	* opts.c (get_option_html_page): Instead of hardcoding a list of
      	options common between C/C++ and Fortran only use gfortran/
      	documentation for warnings that have CL_Fortran set but not
      	CL_C or CL_CXX.
      Jakub Jelinek committed
    • c: Fix ICE with _Atomic side-effect in nested fn param decls [PR94842] · 61fb8963
      If there are _Atomic side-effects in the parameter declarations
      of non-nested function, when they are parsed, current_function_decl is
      NULL, the create_artificial_label created labels during build_atomic* are
      then adjusted by store_parm_decls through set_labels_context_r callback.
      Unfortunately, if such thing happens in nested function parameter
      declarations, while those decls are parsed current_function_decl is the
      parent function (and am not sure it is a good idea to temporarily clear it,
      some code perhaps should be aware it is in a nested function, or it can
      refer to variables from the parent function etc.) and that means
      store_param_decls through set_labels_context_r doesn't adjust anything.
      As those labels are emitted in the nested function body rather than in the
      parent, I think it is ok to override the context in those cases.
      
      2020-04-30  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c/94842
      	* c-decl.c (set_labels_context_r): In addition to context-less
      	LABEL_DECLs adjust also LABEL_DECLs with context equal to
      	parent function if any.
      	(store_parm_decls): Adjust comment.
      
      	* gcc.dg/pr94842.c: New test.
      Jakub Jelinek committed
    • Bump BASE-VER. · 6032350c
      2020-05-07  Jakub Jelinek  <jakub@redhat.com>
      
      	* BASE-VER: Set to 10.1.1.
      Jakub Jelinek committed
    • Update gennews for GCC 10. · 8786158b
      2020-05-07  Jakub Jelinek  <jakub@redhat.com>
      
      	* gennews (files): Add files for GCC 10.
      Jakub Jelinek committed
    • Daily bump. · 0df8d1ef
      GCC Administrator committed
  7. 06 May, 2020 8 commits
    • c++: Adjust testcase target [pr94946] · d3be91b0
      This uses a target spec to test only on ia32 targets
      Nathan Sidwell committed
    • c++: QT overload regression with attribute [PR94946] · 702d7b71
      Jason's fix for 90570 & 79585 was a bit overzealous.  Dependent attribs should still
      attach to a parameter decl.
      
      	* decl.c (grokdeclarator): Don't splice template attributes in
      	parm context -- they can apply to the parm.
      Nathan Sidwell committed
    • [AArch64] Use __getauxval instead of getauxval in LSE detection code in libgcc · 5a57016d
      This version of the fix uses __getauxval instead of getauxval.
      The whole thing is guarded simply on __gnu_linux__.
      __getauxval was introduced in 2.16 but the aarch64 port was added in 2.17 so in practice I expect all aarch64 glibcs to support __getauxval.
      
      Bootstrapped and tested on aarch64-none-linux-gnu.
      Also tested on aarch64-none-elf.
      
      2020-05-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
      
      	* config/aarch64/lse-init.c (init_have_lse_atomics): Use __getauxval
      	instead of getauxval.
      	(AT_HWCAP): Define.
      	(HWCAP_ATOMICS): Define.
      	Guard detection on __gnu_linux__.
      Kyrylo Tkachov committed
    • x32: Update baseline_symbols.txt · bf33f171
      	* config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
      H.J. Lu committed
    • libstdc++: Update Solaris baselines for GCC 10.1 · 3e8f299c
      I just remembered that the libstdc++ ABI baselines haven't been updated
      for the GCC 10 release yet.  This patch corrects this for Solaris/SPARC
      and x86.
      
      Created on master with make new-abi-baseline on i386-pc-solaris2.11 and
      sparc-sun-solaris2.11, bootstrapped on gcc-10 branch without regressions.
      
      	* config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
      	* config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
      	Likewise.
      	* config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
      	* config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
      	Likewise.
      Rainer Orth committed
    • libstdc++: Document library versioning for 9.[123] and 10.1 · c6ad9cea
      	* doc/xml/manual/abi.xml (abi.versioning.history): Document library
      	versions for GCC 9.[123] and 10.1 releases.
      	* doc/html/*: Regenerate.
      Jonathan Wakely committed
    • libstdc++: Update {x86_64,i?86,powerpc64,s390x,aarch64}-linux baselines for GCC 10.1 · 7cc04a8b
      On Wed, May 06, 2020 at 10:49:13AM +0200, Rainer Orth wrote:
      > I just remembered that the libstdc++ ABI baselines haven't been updated
      > for the GCC 10 release yet.  This patch corrects this for Solaris/SPARC
      > and x86.
      
      Oops, here are the updates from Fedora packages built during the weekend.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
      	* config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
      	* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
      Jakub Jelinek committed
    • doc: Update install.texi for GCC 10 on Solaris · 1f81cadf
      This patch updates install.texi for GCC 10 on Solaris.  It includes some
      general cleanup and updates and includes a couple of caveats, some of
      them found when testing GCC 10.1.0 RC1 with only the bundled tools.
      
      The reference to TGCware on the binaries page is gone because they only
      provide binaries up to Solaris 9.
      
      The note about configuring 64-bit Solaris/SPARC compilers with
      --build=sparcv9-sun-solaris2.11 became necessary because upstream
      config.guess silently reverted my patch to automatically detect this.  We
      already had a bug report about a comparison failure caused by this issue.
      
      Tested with make doc/gccinstall.info and doc/gccinstall.pdf and
      inspection of the resulting files.
      
      	* doc/install.texi: Replace Sun with Solaris as appropriate.
      	(Tools/packages necessary for building GCC, Perl version between
      	5.6.1 and 5.6.24): Remove Solaris 8 reference.
      	(Installing GCC: Binaries, Solaris 2 (SPARC, Intel)): Remove
      	TGCware reference.
      	(Specific, i?86-*-solaris2*): Update version references for
      	Solaris 11.3 and later.  Remove gas 2.26 caveat.
      	(Specific, *-*-solaris2*): Update version references for
      	Solaris 11.3 and later.  Remove boehm-gc reference.
      	Document GMP, MPFR caveats on Solaris 11.3.
      	(Specific, sparc-sun-solaris2*): Update Solaris 9 references.
      	(Specific, sparc64-*-solaris2*): Likewise.
      	Document --build requirement.
      Rainer Orth committed