1. Jun 24, 2022
  2. Jun 23, 2022
  3. May 09, 2022
  4. May 08, 2022
  5. May 06, 2022
  6. Apr 22, 2022
    • Maxim Blinov's avatar
      Merge pull request #7 from mablinov/dev-rebase-2 · 4738f09f
      Maxim Blinov authored
      Rebase development branch on latest upstream master
      4738f09f
    • Jeremy Bennett's avatar
      Update README for CORE-V · 8e4ee030
      Jeremy Bennett authored
      
      
      Files changed:
      
      	* README: Add CORE-V preamble.
      
      Signed-off-by: default avatarJeremy Bennett <jeremy.bennett@embecosm.com>
      8e4ee030
    • GCC Administrator's avatar
      Daily bump. · c1a9cf67
      GCC Administrator authored
      c1a9cf67
    • Segher Boessenkool's avatar
      rs6000/testsuite: xfail bswap-brw.c · 748d46cd
      Segher Boessenkool authored
      This testcase does not generate anywhere near optimal code for 32-bit
      code.  For p10 it actually now fails this testcase, after the previous
      patch.  Let's xfail it.
      
      2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>
      
      gcc/testsuite/
      	PR target/103197
      	PR target/102146
      	* gcc.target/powerpc/bswap-brw.c: Add xfail on scan-assembler for -m32.
      748d46cd
    • Segher Boessenkool's avatar
      rs6000: Disparage lfiwzx and similar · 26fa464f
      Segher Boessenkool authored
      RA now chooses GEN_OR_VSX_REGS in most cases.  This is great in most
      cases, but we often (or always?) use {l,st}{f,xs}iwzx now, which is
      problematic because the integer load and store insns can use cheaper
      addressing modes.  We can fix that by putting a small penalty on the
      instruction alternatives for those.
      
      2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>
      
      	PR target/103197
      	PR target/102146
      	* config/rs6000/rs6000.md (zero_extendqi<mode>2 for EXTQI): Disparage
      	the "Z" alternatives in {l,st}{f,xs}iwzx.
      	(zero_extendhi<mode>2 for EXTHI): Ditto.
      	(zero_extendsi<mode>2 for EXTSI): Ditto.
      	(*movsi_internal1): Ditto.
      	(*mov<mode>_internal1 for QHI): Ditto.
      	(movsd_hardfloat): Ditto.
      26fa464f
    • Segher Boessenkool's avatar
      rs6000: Add effective target has_arch_ppc64 · fc9deca6
      Segher Boessenkool authored
      This is true if we have -mpowerpc64.
      
      2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>
      
      gcc/testsuite/
      	* lib/target-supports.exp (check_effective_target_has_arch_ppc64): New.
      fc9deca6
    • Iain Buclaw's avatar
      d: Merge upstream dmd eb7bee331, druntime 27834edb, phobos ac296f80c. · ae56e2da
      Iain Buclaw authored
      D front-end changes:
      
          - Import dmd v2.100.0-beta.1.
          - Print deprecation messages for scope violations unless
            `-frevert=dip1000' is used.
          - Fixed a missed case of switch case fallthrough not being caught by
            the compiler.
      
      D runtime changes:
      
          - Import druntime v2.100.0-beta.1.
      
      Phobos changes:
      
          - Import phobos v2.100.0-beta.1.
      
      gcc/d/ChangeLog:
      
      	* dmd/MERGE: Merge upstream dmd eb7bee331.
      	* dmd/VERSION: Update version to v2.100.0-beta.1.
      	* d-lang.cc (d_handle_option): Handle OPT_frevert_dip1000.
      	* lang.opt (frevert=dip1000): New option.
      
      libphobos/ChangeLog:
      
      	* libdruntime/MERGE: Merge upstream druntime 27834edb.
      	* src/MERGE: Merge upstream phobos ac296f80c.
      	* src/Makefile.am (PHOBOS_DSOURCES): Add std/int128.d.
      	* src/Makefile.in: Regenerate.
      ae56e2da
    • Patrick Palka's avatar
      libstdc++: Avoid ASCII assumptions in floating_from_chars.cc · 93dd7f36
      Patrick Palka authored
      In starts_with_ci and in __floating_from_chars_hex's inf/nan handling,
      we were assuming that the letters are contiguous and that 'A' + 32 == 'a'
      which is true for ASCII but not for other character encodings.
      
      This patch fixes starts_with_ci by using a constexpr lookup table that
      maps uppercase letters to lowercase, and fixes __floating_from_chars_hex
      by using __from_chars_alnum_to_val.
      
      libstdc++-v3/ChangeLog:
      
      	* include/std/charconv (__from_chars_alnum_to_val_table):
      	Simplify initialization of __lower/__upper_letters.
      	(__from_chars_alnum_to_val): Default the template parameter to
      	false.
      	* src/c++17/floating_from_chars.cc (starts_with_ci): Don't
      	assume the uppercase and lowercase letters are contiguous.
      	(__floating_from_chars_hex): Likewise.
      93dd7f36
  7. Apr 21, 2022
    • Marek Polacek's avatar
      c++: Remove unused parameter · 605a80bb
      Marek Polacek authored
      gcc/cp/ChangeLog:
      
      	* constexpr.cc (cxx_eval_logical_expression): Remove unused
      	parameter.
      	(cxx_eval_constant_expression) <case TRUTH_ANDIF_EXPR>,
      	<case TRUTH_OR_EXPR>: Adjust calls to cxx_eval_logical_expression.
      605a80bb
    • Marek Polacek's avatar
      c++: wrong error with constexpr COMPOUND_EXPR [PR105321] · 93b65ed9
      Marek Polacek authored
      Here we issue a bogus error for the first assert in the test.  Therein
      we have
      
      <retval> = (void) (VIEW_CONVERT_EXPR<bool>(yes) || handle_error ());, VIEW_CONVERT_EXPR<int>(value);
      
      which has a COMPOUND_EXPR, so we get to cxx_eval_constant_expression
      <case COMPOUND_EXPR>.  The problem here is that we call
      
      7044             /* Check that the LHS is constant and then discard it.  */
      7045             cxx_eval_constant_expression (ctx, op0,
      7046                                           true, non_constant_p, overflow_p,
      7047                                           jump_target);
      
      where lval is always true, so the PARM_DECL 'yes' is not evaluated into
      its value.
      
      Fixed by always passing false for 'lval' in cxx_eval_logical_expression;
      there's no case where we actually expect an lvalue from a TRUTH_*.
      
      	PR c++/105321
      
      gcc/cp/ChangeLog:
      
      	* constexpr.cc (cxx_eval_logical_expression): Always pass false for lval
      	to cxx_eval_constant_expression.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/cpp0x/constexpr-105321.C: New test.
      93b65ed9
    • Fritz Reese's avatar
      fortran: Fix conv of UNION constructors [PR105310] · c049f638
      Fritz Reese authored
      This fixes an ICE when a UNION is the (1+8*2^n)-th field in a DEC
      STRUCTURE when compiled with -finit-derived -finit-local-zero.
      The problem was CONSTRUCTOR_APPEND_ELT from within gfc_conv_union_initializer
      modified the vector pointer, but the pointer was passed by-value,
      so the old pointer from the caller (gfc_conv_structure) pointed to freed
      memory.
      
      	PR fortran/105310
      
      gcc/fortran/ChangeLog:
      
      	* trans-expr.cc (gfc_conv_union_initializer): Pass vec* by reference.
      
      gcc/testsuite/ChangeLog:
      
      	* gfortran.dg/dec_union_12.f90: New test.
      c049f638
    • Patrick Palka's avatar
      libstdc++: Work around modules ICE in <charconv> [PR105297] · 1e6c0e69
      Patrick Palka authored
      This makes the initializer for __table in __from_chars_alnum_to_val
      dependent in an artificial way, which works around the reported modules
      testsuite ICE by preventing the compiler from evaluating the initializer
      parse time.
      
      Compared to the alternative workaround of using a non-local class type
      for __table, this workaround has the advantage of slightly speeding up
      compilation of <charconv>, since now the table won't get built (via
      constexpr evaluation) until the integer std::from_chars overload is
      instantiated.
      
      	PR c++/105297
      	PR c++/105322
      
      libstdc++-v3/ChangeLog:
      
      	* include/std/charconv (__from_chars_alnum_to_val): Make
      	initializer for __table dependent in an artificial way.
      1e6c0e69
    • Jonathan Wakely's avatar
      libstdc++: Remove bogus assertion in std::from_chars [PR105324] · cf371075
      Jonathan Wakely authored
      I'm not sure what I was thinking when I added this assertion, maybe it
      was supposed to be alignment == 1 (which is what the pmr::string actually
      uses). The simplest fix is to just remove the assertion.
      
      The assertion is no longer enabled by default on trunk, but it's still
      there for the --enablke-libstdcxx-debug build, and is still wrong. The
      fix is needed on the gcc-11 branch.
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/105324
      	* src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
      	Remove assertion.
      	* testsuite/20_util/from_chars/pr105324.cc: New test.
      cf371075
    • Martin Liska's avatar
      Support --compress-debug-sections for ld.mold. · 811c7fbd
      Martin Liska authored
      gcc/ChangeLog:
      
      	* configure.ac: Enable compressed debug sections for mold
      	linker.
      	* configure: Regenerate.
      811c7fbd
    • Jakub Jelinek's avatar
      emit-rtl: Fix -fcompare-debug bug with label references in debug insns [PR105203] · 504b02c7
      Jakub Jelinek authored
      When we compute LABEL_NUSES from scratch, mark_all_labels doesn't call
      mark_jump_label on DEBUG_INSNs:
                    if (NONDEBUG_INSN_P (insn))
                      mark_jump_label (PATTERN (insn), insn, 0);
      and so doesn't increment LABEL_NUSES from references in DEBUG_INSNs.
      But, when we call emit_copy_of_insn_after e.g. when duplicating some
      DEBUG_INSNs, we call it even on those, which then results in LABEL_NUSES
      differences and -fcompare-debug failures.
      
      The following patch makes sure we don't call it on DEBUG_INSNs.
      
      2022-04-21  Jakub Jelinek  <jakub@redhat.com>
      
      	PR debug/105203
      	* emit-rtl.cc (emit_copy_of_insn_after): Don't call mark_jump_label
      	on DEBUG_INSNs.
      
      	* gfortran.dg/g77/pr105203.f: New test.
      504b02c7
    • Ian Lance Taylor's avatar
      runtime: use correct field name for PPC32 GLIBC registers · 6a4e9934
      Ian Lance Taylor authored
      One of these days we will get this right.
      
      Fixes PR go/105315
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/401374
      6a4e9934
    • GCC Administrator's avatar
      Daily bump. · 29a25a60
      GCC Administrator authored
      29a25a60
  8. Apr 20, 2022
    • Ed Catmur's avatar
      c++: Fall through for arrays of T vs T cv [PR104996] · 5bde80f4
      Ed Catmur authored
      
      
      If two arrays do not have the exact same element type including
      qualification, this could be e.g. f(int (&&)[]) vs. f(int const (&)[]),
      which can still be distinguished by the lvalue-rvalue tiebreaker.
      
      By tightening this branch (in accordance with the letter of the Standard) we
      fall through to the next branch, which tests whether they have different
      element type ignoring qualification and returns 0 in that case; thus we only
      actually fall through in the T[...] vs. T cv[...] case, eventually
      considering the lvalue-rvalue tiebreaker at the end of compare_ics.
      
      Signed-off-by: default avatarEd Catmur <ed@catmur.uk>
      
      	PR c++/104996
      
      gcc/cp/ChangeLog:
      
      	* call.cc (compare_ics): When comparing list-initialization
      	sequences, do not return early.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/cpp0x/initlist129.C: New test.
      5bde80f4
    • Jonathan Wakely's avatar
      libstdc++: Fix macro checked by test · 67ded3a1
      Jonathan Wakely authored
      The macro being tested here is wrong, but just happens to have the same
      value as the one supposed to be tests.
      
      libstdc++-v3/ChangeLog:
      
      	* testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
      	Check correct feature test macro.
      67ded3a1
    • Jonathan Wakely's avatar
      libstdc++: Use LTLIBICONV when linking libstdc++.so [PR93602] · c644b7df
      Jonathan Wakely authored
      This fixes missing libiconv symbols when libstdc++ is built on a system
      that has libiconv installed. If the libiconv headers are found then
      libstdc++ depends on libiconv_open etc instead of libc's iconv_open. But
      without this fix libstdc++ is not linked to the libiconv library that
      provides the definitions of those symbols.
      
      As discussed in PR 93602 this changed means that libstdc++.so.6 might
      have an rpath pointing to the location of the libiconv.so library. If
      that is not desired, then GCC must be configured to link to a static
      libiconv.a instead, using either --with-libiconv-type=static or an
      in-tree build of libiconv.
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/93602
      	* doc/xml/manual/prerequisites.xml: Document libiconv
      	workarounds.
      	* doc/html/manual/setup.html: Regenerate.
      	* src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
      	* src/Makefile.in: Regenerate.
      c644b7df
    • Richard Biener's avatar
      tree-optimization/104912 - ensure cost model is checked first · 4d4eaa77
      Richard Biener authored
      The following makes sure that when we build the versioning condition
      for vectorization including the cost model check, we check for the
      cost model and branch over other versioning checks.  That is what
      the cost modeling assumes, since the cost model check is the only
      one accounted for in the scalar outside cost.  Currently we emit
      all checks as straight-line code combined with bitwise ops which
      can result in surprising ordering of checks in the final assembly.
      
      Since loop_version accepts only a single versioning condition
      the splitting is done after the fact.
      
      The result is a 1.5% speedup of 416.gamess on x86_64 when compiling
      with -Ofast and tuning for generic or skylake.  That's not enough
      to recover from the slowdown when vectorizing but it now cuts off
      the expensive alias versioning test.
      
      2022-03-21  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/104912
      	* tree-vect-loop-manip.cc (vect_loop_versioning): Split
      	the cost model check to a separate BB to make sure it is
      	checked first and not combined with other version checks.
      4d4eaa77
    • Richard Biener's avatar
      tree-optimization/105312 - fix ISEL VCOND expansion · 36f1de95
      Richard Biener authored
      The following aligns ISEL VEC_COND_EXPR expansion using VCOND
      with the optab query done by vector lowering.  Instead of only
      allowing the signed optab to provide EQ/NE compares we allow both
      here though since there seems to be no documented canonicalization.
      
      2022-04-20  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/105312
      	* gimple-isel.cc (gimple_expand_vec_cond_expr): Query both
      	VCOND and VCONDU for EQ and NE.
      
      	* gcc.target/arm/pr105312.c: New testcase.
      36f1de95
    • Jan Hubicka's avatar
      Fix overflows in ipa-modref-tree.cc · 0707f428
      Jan Hubicka authored
      gcc/ChangeLog:
      
      2022-04-20  Jan Hubicka  <hubicka@ucw.cz>
      
      	PR ipa/103818
      
      	* ipa-modref-tree.cc (modref_access_node::closer_pair_p): Use
      	poly_offset_int to avoid overflow.
      	(modref_access_node::update2): likewise.
      
      gcc/testsuite/ChangeLog:
      
      2022-04-20  Jan Hubicka  <hubicka@ucw.cz>
      
      	* gcc.c-torture/compile/103818.c: New test.
      0707f428
    • Jakub Jelinek's avatar
      cgraph: Fix up semantic_interposition handling [PR105306] · 2a6d372b
      Jakub Jelinek authored
      cgraph_node has a semantic_interposition flag which should mirror
      opt_for_fn (decl, flag_semantic_interposition).  But it actually is
      initialized not from that, but from flag_semantic_interposition in the
        explicit symtab_node (symtab_type t)
          : type (t), resolution (LDPR_UNKNOWN), definition (false), alias (false),
      ...
            semantic_interposition (flag_semantic_interposition),
      ...
            x_comdat_group (NULL_TREE), x_section (NULL)
        {}
      ctor.  I think that might be fine for varpool nodes, but since
      flag_semantic_interposition is now implied from -Ofast it isn't correct
      for cgraph nodes, unless we guarantee that cgraph node for a particular
      function decl is always created while that function is
      current_function_decl.  That is often the case, but not always as the
      following function shows.
      Because symtab_node's ctor doesn't know for which decl the cgraph node
      is being created, the following patch keeps that as is, but updates it from
      opt_for_fn (decl, flag_semantic_interposition) when we know that, or for
      clones copies that flag (often it is then overridden in
      set_new_clone_decl_and_node_flags, but not always).
      
      2022-04-20  Jakub Jelinek  <jakub@redhat.com>
      
      	PR ipa/105306
      	* cgraph.cc (cgraph_node::create): Set node->semantic_interposition
      	to opt_for_fn (decl, flag_semantic_interposition).
      	* cgraphclones.cc (cgraph_node::create_clone): Copy over
      	semantic_interposition flag.
      
      	* g++.dg/opt/pr105306.C: New test.
      2a6d372b