1. 01 Jul, 2020 5 commits
    • coroutines: Collect the function body rewrite code. · b1c3d311
      The standard describes a rewrite of the body of the user-authored
      function (which wraps it in a try-catch block and provides the
      initial and final suspend expressions).  The exact arrangement of
      this was still in flux right up until the DIS and as a consequence
      was a bit of a moving target.
      
      The net result was a fragmented implementation of the parts of
      the rewrite which is now impeding progress in fixing other issues.
      
      This patch collates the rewrite action into a single function and
      carries this out earlier.
      
      gcc/cp/ChangeLog:
      
      	* coroutines.cc (expand_one_await_expression): Remove
      	code dealing with initial suspend.
      	(build_actor_fn): Remove code special-casing initial
      	and final suspend. Handle the final suspend and marking
      	of the coroutine as done.
      	(coro_rewrite_function_body): New.
      	(bind_expr_find_in_subtree): Remove.
      	(coro_body_contains_bind_expr_p): Remove.
      	(morph_fn_to_coro): Split the rewrite of the original
      	function into coro_rewrite_function_body and call it.
      
      (cherry picked from commit 9252a208f485eed2757d601657facfa0aee6cd21)
      Iain Sandoe committed
    • coroutines: Fix a diagnostic trailing space warning. · 7e03d25c
      A recently add diagnostic has a trailing space.
      Fixed thus.
      
      gcc/cp/ChangeLog:
      
      	* coroutines.cc (morph_fn_to_coro): Remove trailing
      	space in a diagnostic.
      
      (cherry picked from commit eef63aacb255befb4e483cf680a3d0dcb2d8794e)
      Iain Sandoe committed
    • arm: Fix the failing mve scalar shift execution tests. · b7aedecd
      In GCC testsuite the MVE scalar shift execution tests (mve_scalar_shifts[1-4].c) are failings
      because of executing them on target hardware which doesn't support MVE instructions. This patch
      restricts those tests to execute only on target hardware that support MVE instructions.
      
      2020-06-22  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
      
      gcc/
      	* doc/sourcebuild.texi (arm_v8_1m_mve_fp_ok): Add item.
      	(arm_mve_hw): Likewise.
      
      gcc/testsuite/
      	* gcc.target/arm/mve/intrinsics/mve_scalar_shifts1.c: Modify.
      	* gcc.target/arm/mve/intrinsics/mve_scalar_shifts2.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/mve_scalar_shifts3.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/mve_scalar_shifts4.c: Likewise.
      	* lib/target-supports.exp (check_effective_target_arm_mve_hw): Define.
      
      (cherry picked from commit 99abb146fd0923ebda2c7e7681adb18e6798a90c)
      Srinath Parvathaneni committed
    • Fortran : Bogus error with additional blanks in type(*) PR95829 · e025298c
      Checking for "* ) " instead of "*)" clears the bogus error.
      
      2020-07-01  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      gcc/fortran/
      
      	PR fortran/95829
      	* decl.c (gfc_match_decl_type_spec): Compare with "* ) " instead
      	of "*)".
      
      2020-07-01  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      gcc/testsuite/
      
      	PR fortran/95829
      	* gfortran.dg/pr95829.f90: New test.
      
      (cherry picked from commit 624e60f080989fa57756575a0bb47a97748b52b8)
      Mark Eggleston committed
    • Daily bump. · d7384686
      GCC Administrator committed
  2. 30 Jun, 2020 12 commits
    • rs6000: Rename isa attribute "fut" to "p10" · a642df80
      	== The actual changelog had
      	==	Backport from trunk
      	==	2020-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
      	== but the commit scripts refuse that
      
      2020-06-30  Segher Boessenkool  <segher@kernel.crashing.org>
      
      	* config/rs6000/rs6000.md (isa): Rename "fut" to "p10".
      Segher Boessenkool committed
    • rs6000: Testsuite changes to go with the previous commit · 8cb67fae
      	== The actual changelog had
      	==	Backport from trunk
      	==	2020-06-22  Segher Boessenkool  <segher@kernel.crashing.org>
      	== but the commit scripts refuse that
      
      2020-06-30  Segher Boessenkool  <segher@kernel.crashing.org>
      
      gcc/testsuite/ChangeLog:
      	* gcc.target/powerpc/cpu-future.c: Something was done here.
      	* gcc.target/powerpc/localentry-1.c: Something was done here.
      	* gcc.target/powerpc/localentry-detect-1.c: Something was done here.
      	* gcc.target/powerpc/mma-builtin-1.c: Something was done here.
      	* gcc.target/powerpc/mma-builtin-2.c: Something was done here.
      	* gcc.target/powerpc/mma-builtin-3.c: Something was done here.
      	* gcc.target/powerpc/mma-builtin-4.c: Something was done here.
      	* gcc.target/powerpc/mma-builtin-5.c: Something was done here.
      	* gcc.target/powerpc/mma-builtin-6.c: Something was done here.
      	* gcc.target/powerpc/notoc-direct-1.c: Something was done here.
      	* gcc.target/powerpc/pcrel-sibcall-1.c: Something was done here.
      	* gcc.target/powerpc/pr93122.c: Something was done here.
      	* lib/target-supports.exp: Stuff.
      Segher Boessenkool committed
    • rs6000: Rename future to power10 · 9913aa6f
      	== The actual changelog had
      	==	Backport from trunk
      	==	2020-06-22  Segher Boessenkool  <segher@kernel.crashing.org>
      	== but the commit scripts refuse that
      
      2020-06-30  Segher Boessenkool  <segher@kernel.crashing.org>
      
      	* config/rs6000/driver-rs6000.c (asm_names): Use -mpwr10 for power10
      	on AIX, and -mpower10 elsewhere.
      	* config/rs6000/future.md: Delete.
      	* config/rs6000/linux64.h: Update comments.  Use TARGET_POWER10, not
      	TARGET_FUTURE.
      	* config/rs6000/power10.md: New file.
      	* config/rs6000/rs6000-builtin.def: Update comments.
      	* config/rs6000/rs6000-call.c: Use P10_BUILTIN_*, not FUTURE_BUILTIN_*.
      	Update compiler messages.
      	* config/rs6000/rs6000-cpus.def: Update comments.  Use ISA_3_1_*, not
      	ISA_FUTURE_*.  Use OPTION_MASK_POWER10, not OPTION_MASK_FUTURE.
      	* config/rs6000/rs6000-opts.h: Use PROCESSOR_POWER10, not
      	PROCESSOR_FUTURE.
      	* config/rs6000/rs6000-string.c: Ditto.
      	* config/rs6000/rs6000-tables.opt (rs6000_cpu_opt_value): Use "power10"
      	instead of "future", reorder it to right after "power9".
      	* config/rs6000/rs6000.c: Update comments.  Use OPTION_MASK_POWER10,
      	not OPTION_MASK_FUTURE.  Use TARGET_POWER10, not TARGET_FUTURE.  Use
      	RS6000_BTM_P10, not RS6000_BTM_FUTURE.  Update compiler messages.
      	Use PROCESSOR_POWER10, not PROCESSOR_FUTURE.  Use ISA_3_1_MASKS_SERVER,
      	not ISA_FUTURE_MASKS_SERVER.
      	(rs6000_opt_masks): Use "power10" instead of "future".
      	(rs6000_builtin_mask_names): Ditto.
      	(rs6000_disable_incompatible_switches): Ditto.
      	* config/rs6000/rs6000.h: Use -mpower10, not -mfuture.  Use
      	-mcpu=power10, not -mcpu=future.  Use MASK_POWER10, not MASK_FUTURE.
      	Use OPTION_MASK_POWER10, not OPTION_MASK_FUTURE.  Use RS6000_BTM_P10,
      	not RS6000_BTM_FUTURE.
      	* config/rs6000/rs6000.md: Use "power10", not "future".  Use
      	TARGET_POWER10, not TARGET_FUTURE.  Include "power10.md", not
      	"future.md".
      	* config/rs6000/rs6000.opt (mfuture): Delete.
      	(mpower10): New.
      	* config/rs6000/t-rs6000: Use "power10.md", not "future.md".
      	* config/rs6000/vsx.md: Use TARGET_POWER10, not TARGET_FUTURE.
      Segher Boessenkool committed
    • PR fortran/95978 - ICE in gfc_match_data, at fortran/decl.c:731 · aa0868ff
      Catch NULL pointer dereference on invalid DATA statement.
      
      gcc/fortran/
      	PR fortran/95978
      	* decl.c (gfc_match_data): Avoid NULL pointer dereference.
      
      (cherry picked from commit 583812c2e2f3593823622b0a5821d957c832dbd0)
      Harald Anlauf committed
    • PR fortran/71706 - ICE on using sync images with -fcheck=bounds · 5d8ee8e9
      The run-time checking code did not properly convert the kind of the
      argument to SYNC IMAGES, leading to an error in verify_gimple.  Fix that.
      
      gcc/fortran/
      	PR fortran/71706
      	* trans-stmt.c (gfc_trans_sync): Do proper kind conversion in
      	bounds-checking code.
      
      (cherry picked from commit e6cc67f6616c96f3e18a434e0c74ba2f3818cb6d)
      Harald Anlauf committed
    • Mark up unreachable OpenACC 'attach' code path · 4b185ee1
      ... introduced in commit 8e7e71ff (r279625)
      "OpenACC 2.6 deep copy: libgomp parts".
      
      	libgomp/
      	* target.c (gomp_map_vars_existing): Assert 'kind !=
      	GOMP_MAP_ATTACH'.
      	(gomp_map_vars_internal): Clean up.
      
      (cherry picked from commit aff43ac0aed5185884724adbdfd4dbbabd87637c)
      Thomas Schwinge committed
    • arm: Don't generate invalid LDRD insns · c32074f6
      This fixes a bug in the arm backend where GCC generates invalid LDRD
      instructions. The LDRD instruction requires the first transfer register to be
      even, but GCC attempts to use odd registers here. For example, with the
      following C code:
      
          struct c {
            double a;
          } __attribute((aligned)) __attribute((packed));
          struct c d;
          struct c f(struct c);
          void e() { f(d); }
      
      The struct d is passed in registers r1 and r2 to the function f, and GCC
      attempted to do this with a LDRD instruction when compiling with -march=armv7-a
      on a soft float toolchain.
      
      The fix is analogous to the corresponding one for STRD in the same function:
      https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=52057dc4ac5295caebf83147f688d769c93cbc8d
      
      gcc/:
      	* config/arm/arm.c (output_move_double): Fix codegen when loading into
      	a register pair with an odd base register.
      
      gcc/testsuite/:
      	* gcc.c-torture/compile/packed-aligned-1.c: New test.
      	* gcc.c-torture/execute/packed-aligned.c: New test.
      
      (cherry picked from commit 8b8f3117263ca79b3febadadb07732588d99d5f6)
      Alex Coplan committed
    • Do not generate recursion check for compiler-generated procedures. · 6e1d5e76
      This one-line fix removes a check for recursion for procedures
      which are compiler-generated, such as finalizers or deallocation.
      These need to be recursive, even if the user code should not be.
      
      gcc/fortran/ChangeLog:
      
      	PR fortran/95743
      	* trans-decl.c (gfc_generate_function_code): Do not generate
      	recursion check for compiler-generated procedures.
      
      (cherry picked from commit 95cdcf701dad826f225d6413b59650f181954399)
      Thomas Koenig committed
    • coroutines: Handle namespaces while scanning local vars [PR95711]. · 65025a6d
      We need to skip past namespace decls when scanning the bind
      expression var lists checking for local vars.
      
      gcc/cp/ChangeLog:
      
      	PR c++/95711
      	* coroutines.cc (register_local_var_uses): Skip past
      	namespace decls.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/95711
      	* g++.dg/coroutines/pr95711.C: New test.
      
      (cherry picked from commit 06ed4aae1c2fa84b7050a286d866db4a6def3c36)
      Iain Sandoe committed
    • coroutines: Handle awaiters that are sub-objects [PR95736] · c5a90f61
      Move deciding on initializers for awaitables to the build of the
      co_await, this allows us to analyse cases that do not need
      a temporary at that point.
      
      As the PR shows, the late analysis meant that we  were not
      checking properly for the case that an awaiter is a sub-object
      of an existing variable outside the current function scope (and
      therefore does not need to be duplicated in the frame).
      
      gcc/cp/ChangeLog:
      
      	PR c++/95736
      	* coroutines.cc (get_awaitable_var): New helper.
      	(build_co_await): Check more carefully before
      	copying an awaitable.
      	(expand_one_await_expression): No initializer
      	is required when the awaitable is not a temp.
      	(register_awaits): Remove handling that is now
      	completed when the await expression is built.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/95736
      	* g++.dg/coroutines/pr95736.C: New test.
      
      (cherry picked from commit daaed0199ee57013ae011421a7e90b7bdd295373)
      Iain Sandoe committed
    • coroutines: Improve diagnostics for one allocator case. · 289437aa
      If the user provides operator new and that is noexcept, this
      implies that it can fail with a null return.  At that point, we expect
      to be able to call get_return_object_on_allocation_failure().
      
      This diagnoses the case where such an operator new has been
      provided, but the g-r-o-o-a-f is either missing or unusable.
      
      gcc/cp/ChangeLog:
      
      	* coroutines.cc (morph_fn_to_coro): Diagnose unavailable
      	get_return_object_on_allocation_failure.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/coroutines/coro-bad-grooaf-01-grooaf-expected.C: New test.
      
      (cherry picked from commit 9c5ca11a33fa91345fe813d449ddc4a821fc72d5)
      Iain Sandoe committed
    • Daily bump. · 11e1cfcf
      GCC Administrator committed
  3. 29 Jun, 2020 10 commits
    • Update gcc sv.po. · 4816bf6a
      	* sv.po: Update.
      Joseph Myers committed
    • PR fortran/95340 - ICE in gfc_match_select_rank, at fortran/match.c:6690 · 687147ab
      Do not dereference NULL pointer when querying array shape of possibly
      improperly delared variable.
      
      gcc/fortran/
      	PR fortran/95340
      	* match.c (gfc_match_select_rank): Do not dereference NULL pointer.
      
      (cherry picked from commit b62cac6d92ff251213753475b69ec0b269cb7fae)
      Harald Anlauf committed
    • PR fortran/95880 - ICE in gfc_add_type, at fortran/symbol.c:2030 · e3942f91
      The fix for PR39695 did not properly distinguish between procedure names
      and other symbols names in errors emitted for invalid code.  Fix that.
      
      gcc/fortran/
      	PR fortran/95880
      	* symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
      	otherwise fall back to sym->name.
      
      (cherry picked from commit f3a8f66a83f8c94f6fbb0233cefba8032f2e4876)
      Harald Anlauf committed
    • coroutines: Handle non-method promise expressions [PR95519] · 6efc255f
      The PR  points out that the standard does not restrict promise
      expressions to methods, but the current implementation does.
      
      The patch factors out the building of a general promise expression,
      and then uses it in a fairly mechanical replacement of each case
      that we need such an expressions.
      
      This extends the handling for p.xxxxxx() expressions to cover the
      cases where the promise member is some form callable.
      
      Tests are added for each of the promise expressions.
      
      It's somewhat tortuous to find good uses for this for the
      get-return-object and get-return-object-on-allocation-failure
      cases, but they are included anyway.
      
      	Backported from e74c76073092f4715007584edb1fe6b7a17274db and 31419a80b6bf84b1bf3bcb2489b2e660563f0dfe
      
      gcc/cp/ChangeLog:
      
      	PR c++/95519
      	* coroutines.cc (struct coroutine_info):Add a field
      	to hold computed p.return_void expressions.
      	(coro_build_promise_expression): New.
      	(get_coroutine_return_void_expr): New.
      	(finish_co_yield_expr): Build the promise expression
      	using coro_build_promise_expression.
      	(finish_co_return_stmt): Likewise.
      	(build_init_or_final_await): Likewise.
      	(morph_fn_to_coro): Likewise, for several cases.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/95519
      	* g++.dg/coroutines/torture/pr95519-00-return_void.C: New test.
      	* g++.dg/coroutines/torture/pr95519-01-initial-suspend.C: New test.
      	* g++.dg/coroutines/torture/pr95519-02-final_suspend.C: New test.
      	* g++.dg/coroutines/torture/pr95519-03-return-value.C: New test.
      	* g++.dg/coroutines/torture/pr95519-04-yield-value.C: New test.
      	* g++.dg/coroutines/torture/pr95519-05-gro.C: New test.
      	* g++.dg/coroutines/torture/pr95519-06-grooaf.C: New test.
      	* g++.dg/coroutines/torture/pr95519-07-unhandled-exception.C: New test.
      Iain Sandoe committed
    • coroutines: Handle bad g-r-o-o-a-f cases. · e6d3351d
      If we see a get_return_object_on_allocation_failure in the
      promise, we expect to be able to use it.  If this isn't
      possible (because of some error in the declaration) then we
      need to handle the erroneous return to allow following code
      to complete.
      
      gcc/cp/ChangeLog:
      
      	* coroutines.cc (morph_fn_to_coro): Handle error
      	returns in building g-r-o-o-a-f expressions.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/coroutines/coro1-allocators.h (BAD_GROOAF_STATIC):
      	New.
      	* g++.dg/coroutines/coro-bad-grooaf-00-static.C: New test.
      
      (cherry picked from commit e195c8045a1f3604f0f6b339e9ff731ebd9dcb0e)
      Iain Sandoe committed
    • PR libstdc++/95915 · deb9c51c
      	PR libstdc++/95915
      	* include/std/variant (_Uninitialized):
      	Adjust the condition and the comment.
      	* testsuite/20_util/variant/95915.cc: New.
      	* testsuite/20_util/variant/compile.cc: Add new test.
      
      (cherry picked from commit 24b54628cfa95194a8de4071c28cb56e6e81c08e)
      Ville Voutilainen committed
    • testsuite: Fix g++.dg/torture/pr95493.C FAIL on i686-linux with -O0. · 62175c50
      2020-06-09  Jakub Jelinek  <jakub@redhat.com>
      
      	* g++.dg/torture/pr95493.C: Add -Wno-psabi -w to dg-additional-options.
      
      (cherry picked from commit 9a39b91d934e7acd8f3a9767b6d5febe90168d0d)
      Jakub Jelinek committed
    • c-family: Use TYPE_OVERFLOW_UNDEFINED instead of !TYPE_UNSIGNED in pointer_sum [PR95903] · e29959c5
      For lp64 targets and int off ... ptr[off + 1]
      is lowered in pointer_sum to *(ptr + ((sizetype) off + (sizetype) 1)).
      That is fine when signed integer wrapping is undefined (and is not done
      already if off has unsigned type), but changes behavior for -fwrapv, where
      overflow is well defined.  Runtime test could be:
      int
      main ()
      {
        char *p = __builtin_malloc (0x100000000UL);
        if (!p) return 0;
        char *q = p + 0x80000000UL;
        int o = __INT_MAX__;
        q[o + 1] = 1;
        if (q[-__INT_MAX__ - 1] != 1) __builtin_abort ();
        return 0;
      }
      with -fwrapv or so, not included in the testsuite because it requires 4GB
      allocation (with some other test it would be enough to have something
      slightly above 2GB, but still...).
      
      2020-06-27  Jakub Jelinek  <jakub@redhat.com>
      
      	PR middle-end/95903
      gcc/c-family/
      	* c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
      	!TYPE_UNSIGNED check to see if we can apply distributive law and handle
      	smaller precision intop operands separately.
      gcc/testsuite/
      	* c-c++-common/pr95903.c: New test.
      
      (cherry picked from commit 37995960984ea2222346dd9d168d332cd6f7adf0)
      Jakub Jelinek committed
    • fold-const: Fix A <= 0 ? A : -A folding [PR95810] · af658427
      We folded A <= 0 ? A : -A into -ABS (A), which is for signed integral types
      incorrect - can invoke on INT_MIN UB twice, once on ABS and once on its
      negation.
      
      The following patch fixes it by instead folding it to (type)-ABSU (A).
      
      2020-06-24  Jakub Jelinek  <jakub@redhat.com>
      
      	PR middle-end/95810
      	* fold-const.c (fold_cond_expr_with_comparison): Optimize
      	A <= 0 ? A : -A into (type)-absu(A) rather than -abs(A).
      
      	* gcc.dg/ubsan/pr95810.c: New test.
      
      (cherry picked from commit 01e10b0ee77e82cb331414c569e02dc7a2c4999e)
      Jakub Jelinek committed
    • Daily bump. · 37ba6ac3
      GCC Administrator committed
  4. 28 Jun, 2020 4 commits
    • d: Merge upstream dmd 8508c4e68. · f6bb36ec
      Fixes a performance bug where 'static foreach' would take an
      exponentially long time to expand during CTFE.
      
      In the following example:
      
          static foreach (i; 0..30000) {}
      
      Compilation time had been reduced from around 40 to 0.08 seconds.
      Memory consumption is also reduced from 3.5GB to 55MB.
      
      Reviewed-on: https://github.com/dlang/dmd/pull/11335
      
      gcc/d/ChangeLog:
      
      	* dmd/cond.c (lowerArrayAggregate): Directly use the elements of the
      	array for TupleExp creation.
      	(lowerNonArrayAggregate): Inline creation of foreach range indexes.
      
      (cherry picked from commit ce56fd949f359a62b86a45aaf975ac2ecc48fa64)
      Iain Buclaw committed
    • coroutines: Copy attributes to the outlined functions [PR95518,PR95813] · c3bf482a
      We had omitted the copying of function attributes, we now copy
      the used, alignment, section values from the original decal and
      the complete set of function attributes.  It is likely that
      some function attributes don't really make sense for coroutines,
      but that can be disgnosed separately. Also mark the outlined
      functions as artificial, since they are; some diagnostic
      processing tests this.
      
      gcc/cp/ChangeLog:
      
      	PR c++/95518
      	PR c++/95813
      	* coroutines.cc (act_des_fn): Copy function
      	attributes onto the outlined coroutine helpers.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/95518
      	PR c++/95813
      	* g++.dg/coroutines/pr95518.C: New test.
      	* g++.dg/coroutines/pr95813.C: New test.
      
      (cherry picked from commit 1e5da6a02fec8aa84bb00966282f420cb70fe4f0)
      Iain Sandoe committed
    • coroutines: Update tests for get-return-object errors. · 4631b977
      We updated the handling of the errors for cases when the
      ramp return cannot be constructed from the user's provided
      get-return-object method.  This updates the testcases to
      cover this.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/coroutines/void-gro-non-class-coro.C: Moved to...
      	* g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C: ...here.
      	* g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C: New test.
      
      (cherry picked from commit 2dbc16552204ffa28b643949eb1f26b787017b39)
      Iain Sandoe committed
    • Daily bump. · 2a748733
      GCC Administrator committed
  5. 27 Jun, 2020 2 commits
  6. 26 Jun, 2020 5 commits
    • PR fortran/95826 - Buffer overflows with PDTs and long symbols · 32613b6a
      With PDTs (parameterized derived types), name mangling results in variably
      long internal symbols.  Use a dynamic buffer instead of a fixed-size one.
      
      gcc/fortran/
      	PR fortran/95826
      	* decl.c (gfc_match_decl_type_spec): Replace a fixed size
      	buffer by a pointer and reallocate if necessary.
      
      (cherry picked from commit 35a335a159216548fc77263ac5df71ff29d3f448)
      Harald Anlauf committed
    • PR fortran/95828 - Buffer overflows with SELECT RANK · 5e00a2d1
      With SELECT RANK, name mangling results in long internal symbols that
      overflows internal buffers.  Fix that.
      
      gcc/fortran/
      	PR fortran/95828
      	* match.c (select_rank_set_tmp): Enlarge internal buffer used in
      	generating a mangled name.
      	* resolve.c (resolve_select_rank): Likewise.
      
      (cherry picked from commit 77d455ee81ec3a23f8b20259a31ab963716f8e82)
      Harald Anlauf committed
    • d: Fix ICE during error recovery in semantic pass · 95f5dc7f
      Fixes a regression caused by an incomplete backport of converting the
      Expression semantic pass to a Visitor.
      
      gcc/d/ChangeLog:
      
      	PR d/95250
      	* dmd/expressionsem.c (class ExpressionSemanticVisitor): Return early
      	if error occurred during semantic of DivExp.
      
      gcc/testsuite/ChangeLog:
      
      	PR d/95250
      	* gdc.dg/pr95250.d: New test.
      
      (cherry picked from commit 1d19c9cd3dd99ba8885c0fc93223918399f73939)
      Iain Buclaw committed
    • d: Fix ICE in uda_attribute_p when looking up unknown attribute · 3e1af1d0
      The target attribute table is not guaranteed to be set in all backends.
      
      gcc/d/ChangeLog:
      
      	PR d/95173
      	* d-attribs.cc (uda_attribute_p): Don't search target attribute table
      	if NULL.
      
      gcc/testsuite/ChangeLog:
      
      	PR d/95173
      	* gdc.dg/pr95173.d: New test.
      
      (cherry picked from commit 62e02c8729a75c4a859edc18e0bcafb87d717f46)
      Iain Buclaw committed
    • Daily bump. · 89da6aab
      GCC Administrator committed
  7. 25 Jun, 2020 2 commits
    • PR fortran/95827 - Buffer overflows with submodules and coarrays · 69240fb9
      With submodules and coarrays, name mangling results in long internal
      symbols.  Enlarge internal buffer.
      
      gcc/fortran/
      	PR fortran/95827
      	* iresolve.c (gfc_get_string): Enlarge internal buffer used in
      	generating the mangled name.
      
      (cherry picked from commit a16d0924f18046704ef9a4b6d9593718594677f1)
      Harald Anlauf committed
    • coroutines: Add a cleanup expression for g-r-o when needed [PR95477]. · d9b3aa51
      The PR reports that we fail to destroy the object initially created from
      the get-return-object call.  Fixed by adding a cleanup when the DTOR is
      non-trivial.  In addition, to meet the specific wording that the call to
      get_return_object creates the glvalue for the return, we must construct
      that in-place in the return object to avoid a second copy/move CTOR.
      
      gcc/cp/ChangeLog:
      
      	PR c++/95477
      	* coroutines.cc (morph_fn_to_coro): Apply a cleanup to
      	the get return object when the DTOR is non-trivial.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/95477
      	* g++.dg/coroutines/pr95477.C: New test.
      	* g++.dg/coroutines/void-gro-non-class-coro.C: New test.
      
      (cherry picked from commit 788b962aa00959e861b45767c5c88ec41ca30c21)
      Iain Sandoe committed