[PATCH] c++, contracts: Simplify contracts headers [NFC].

2025-08-30 Thread Iain Sandoe
cts, get_contract_semantic, set_contract_semantic): Move to contracts.h. * contracts.h (get_contract_role, add_contract_role, validate_contract_role, setup_default_contract_role, lookup_concrete_semantic, get_default_contract_role): Remove. Signed-off-by: Iain Sandoe --- gcc/cp/constexpr

Re: [committed v5] libstdc++: Implement C++26 features [PR119670]

2025-08-30 Thread Iain Sandoe
> On 29 Aug 2025, at 15:12, Rainer Orth wrote: > > Hi Jonathan, > >> The src/c++26/debugging.cc file defines a global volatile int which can >> be set by debuggers to indicate when they are attached and detached from >> a running process. This allows std::is_debugger_present() to give a >> re

Re: [committed v5] libstdc++: Implement C++26 features [PR119670]

2025-08-29 Thread Iain Sandoe
> On 29 Aug 2025, at 15:55, Jonathan Wakely wrote: > > On Fri, 29 Aug 2025 at 15:19, Rainer Orth > wrote: >> >> Hi Jonathan, >>> The src/c++26/debugging.cc file defines a global volatile int which can be set by debuggers to indicate when they are attached and detached from

Re: std::start_lifetime_as vs. aliasing

2025-08-28 Thread Iain Sandoe
> On 28 Aug 2025, at 16:38, Jakub Jelinek wrote: > > On Thu, Aug 28, 2025 at 04:50:15PM +0200, Jakub Jelinek wrote: >> On Thu, Aug 28, 2025 at 04:24:46PM +0200, Richard Biener wrote: >>> That said, if we ever want to improve on this (and solve the redundant >>> store elimination issue), we nee

Re: [PATCH] fixincludes: skip stdio_stdarg_h on modern darwin

2025-08-14 Thread Iain Sandoe
Hi FX, Sorry this slipped of my radar... > On 15 Aug 2025, at 00:02, FX Coudert wrote: > > Hi Iain, > > Gentle ping on that one. It would allow to remove one of the last fixincludes > remaining on modern darwin. Yes OK, great - the more we can remove the better. Iain > > FX > > > >> Le

[pushed] Darwin: Handle linker '-no_deduplicate' option.

2025-08-13 Thread Iain Sandoe
Tested on x86_64, i686 Darwin, pushed to trunk, thanks Iain --- 8< --- Newer linker support an option to disable deduplication of entities. This speeds up linking and can improve debug experience. Adopting the same criteria as clang in adding the option. Signed-off-by: Iain Sandoe

[pushed] Darwin: Handle string constants specially when asan is enabled.

2025-08-13 Thread Iain Sandoe
ded string labels. * g++.dg/torture/darwin-cfstring-3.C: Likewise. Signed-off-by: Iain Sandoe --- gcc/config/darwin-sections.def| 7 gcc/config/darwin.cc | 39 --- .../g++.dg/torture/darwin-cfstring-3.C|

Re: [PATCH] c++: normalize LOOKUP_* flags

2025-08-13 Thread Iain Sandoe
Hi Patrick, > On 13 Aug 2025, at 16:26, Patrick Palka wrote: > > On Sun, 10 Aug 2025, Jason Merrill wrote: > >> On 8/8/25 1:27 PM, Patrick Palka wrote: >>> Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK >>> for trunk? >>> >>> -- >8 -- >>> >>> At some point these flag sta

Re: [PATCH] D: Adjust the code-gen for a string constant.

2025-08-11 Thread Iain Sandoe
Hi Iain, > On 11 Aug 2025, at 17:36, Iain Buclaw wrote: > > Excerpts from Iain Sandoe's message of August 11, 2025 12:33 am: >> Tested on x86_64-darwin (i.e. that the string is now seen as a regular > No preference over whether you go for `length + 1` or > build_string_literal, both are OK. T

[PATCH] D: Adjust the code-gen for a string constant.

2025-08-10 Thread Iain Sandoe
ses where build_string() is used, it seems that some of them are not null-terminated. gcc/d/ChangeLog: * d-codegen.cc (build_filename_from_loc): Account for the terminating null in the string length passed to build_string(). Signed-off-by: Iain Sandoe --- gcc/d/d-codegen.cc

[pushed] Darwin: Anchor block internal symbols must not be linker-visible.

2025-08-09 Thread Iain Sandoe
-visible. (darwin_use_anchors_for_symbol_p): Disallow anchoring on symbols that must be linker-visible (or external), even if the definitions are in this TU. Signed-off-by: Iain Sandoe --- gcc/config/darwin.cc | 38 +- 1 file changed, 33 in

[pushed] Darwin: Section anchors must be linker-visible.

2025-08-09 Thread Iain Sandoe
ary symbol generated. gcc/ChangeLog: * config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): New entry for LANCHOR. Signed-off-by: Iain Sandoe --- gcc/config/darwin.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 9b9a3fe4038..ccfe01ea

Re: [PATCH v3] c++, coroutines: Handle allocation fail returns [PR121219].

2025-07-25 Thread Iain Sandoe
> On 24 Jul 2025, at 17:52, Iain Sandoe wrote: >> On 24 Jul 2025, at 17:46, Jason Merrill wrote: >> >> On 7/24/25 12:39 PM, Iain Sandoe wrote: >>>> On 24 Jul 2025, at 17:31, Jason Merrill wrote: >>>> >>>> On 7/24/25 10:24 AM, Iain S

Re: [PATCH v3] c++, coroutines: Handle allocation fail returns [PR121219].

2025-07-24 Thread Iain Sandoe
> On 24 Jul 2025, at 17:46, Jason Merrill wrote: > > On 7/24/25 12:39 PM, Iain Sandoe wrote: >>> On 24 Jul 2025, at 17:31, Jason Merrill wrote: >>> >>> On 7/24/25 10:24 AM, Iain Sandoe wrote: >>>>>>> We should check (gcc_checking_asse

Re: [PATCH v3] c++, coroutines: Handle allocation fail returns [PR121219].

2025-07-24 Thread Iain Sandoe
> On 24 Jul 2025, at 17:31, Jason Merrill wrote: > > On 7/24/25 10:24 AM, Iain Sandoe wrote: >>>>> We should check (gcc_checking_assert?) that NRVO works in the case where >>>>> we expect it to, rather than let NRVO failures show up as wrong-code. &g

[PATCH v3] c++, coroutines: Handle allocation fail returns [PR121219].

2025-07-24 Thread Iain Sandoe
r the return expressions for the 'normal' and 'allocation failed' cases so that NRV constraints are met. Add checking asserts that we have NRV in expected cases. gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr121219.C: New test. Signed-o

[PATCH v2] c++, coroutines: Handle allocation fail returns [PR121219].

2025-07-24 Thread Iain Sandoe
checking asserts that we have NRV in expected cases. gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr121219.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 77 +++-- .../g++.dg/coroutines/torture/pr121219.C | 149 ++

[PATCH] c++, coroutines: Handle allocation fail return objects [PR121219].

2025-07-23 Thread Iain Sandoe
re/pr121219.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 77 ++--- .../g++.dg/coroutines/torture/pr121219.C | 147 ++ 2 files changed, 201 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/g++.dg/coroutines/

Re: [Fortran, Coarray] Call-out to everyone having Fortran coarray-codes available

2025-07-23 Thread Iain Sandoe
Hi Andre > On 23 Jul 2025, at 08:41, Andre Vehreschild wrote: > thank you for testing. I know already about the missing include. It > is also needed on FreeBSD. What's new is the . Is that really > needed or is it transitively included by ? Could you check by, for > example, just grepping signa

Re: [Fortran, Coarray] Call-out to everyone having Fortran coarray-codes available

2025-07-22 Thread Iain Sandoe
Hi Andre It would be very helpful if there were such a thing as a “hello-coarrays.fxx” code for those of us who do not have existing installations of mpi &c. aand limited time to so tests… … experiments so far - below thanks Iain > >> > > We like everyone to test the new caf_shmem library an

Re: [PATCH] Darwin: account for macOS 26

2025-07-14 Thread Iain Sandoe
Hi FX, sorry for the delay ... > On 14 Jul 2025, at 11:17, FX Coudert wrote: > > Hello, > > darwin25 will be named macOS 26 (codename Tahoe). This is a change from > darwin24, which was macOS 15. We need to adapt the driver to this new > numbering scheme. > > Tested by me on aarch64-darwin25

Re: [PATCH] libphobos: Fully enable Darwin/i386 support

2025-06-30 Thread Iain Sandoe
Hi Rainer, > On 30 Jun 2025, at 12:58, Rainer Orth wrote: > > I recently noticed that libphobos isn't enable by default on 32-bit > Darwin with the target triples determined by config.guess. E.g. on a > Darwin 15 system the target triple is something like > i386-apple-darwin15.6.0 while configu

[pushed] libstdc++: Fix Darwin bootstrap by simplifying ver file syntax.

2025-06-27 Thread Iain Sandoe
564 introduced. Fixed by making the conditional encompass both the brace and the identifier. libstdc++-v3/ChangeLog: * config/abi/pre/gnu.ver: Keep the closing brace of the CXXABI_1.3.17 symbol group together with the identifier for the inherited group. Signed-off-by: Iain San

Re: [PATCH 15/17] coroutines: Removed unused private member in cp_coroutine_transform

2025-06-25 Thread Iain Sandoe
> On 25 Jun 2025, at 15:17, Martin Jambor wrote: > > Hi, > > when building GCC with clang, it warns that the private member suffix > in class cp_coroutine_transform (defined in gcc/cp/coroutines.h) is > not used which indeed looks like it is the case. This patch therefore > removes it. > >

[PATCH v6] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-17 Thread Iain Sandoe
e/pr95615-06-initial-await-resume-throws.C: New test. * g++.dg/coroutines/torture/pr95615-07-body-throws.C: New test. * g++.dg/coroutines/torture/pr95615-08-initial-suspend-throws-uhe-throws.C: New test. * g++.dg/coroutines/torture/pr95615-09-body-throws-uhe-throws.

Re: [PATCH] c++,coroutines: Handle await expressions in assume attributes.

2025-06-17 Thread Iain Sandoe
> On 17 Jun 2025, at 06:02, Jason Merrill wrote: > > On 6/16/25 4:00 PM, Iain Sandoe wrote: >> Hi Jason >>> On 11 Jun 2025, at 23:50, Jason Merrill wrote: >>> >>> On 6/9/25 4:12 PM, Iain Sandoe wrote: >>>> There was some discussion of

[PATCH v5] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-17 Thread Iain Sandoe
uhe-throws.C: New test. * g++.dg/coroutines/torture/pr95615-09-body-throws-uhe-throws.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 265 +- .../coroutines/{ => torture}/pr115908.C | 9 +- .../torture/pr95615-00-no

Re: [PATCH] c++,coroutines: Handle await expressions in assume attributes.

2025-06-16 Thread Iain Sandoe
Hi Jason > On 11 Jun 2025, at 23:50, Jason Merrill wrote: > > On 6/9/25 4:12 PM, Iain Sandoe wrote: >> There was some discussion of this in the PR116775 comments. In the >> end I have matched what clang does in this circumstance, since that >> seems reasona

[PATCH v4] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-16 Thread Iain Sandoe
orture/pr95615-07-body-throws.C: New test. * g++.dg/coroutines/torture/pr95615-08-initial-suspend-throws-uhe-throws.C: New test. * g++.dg/coroutines/torture/pr95615-09-body-throws-uhe-throws.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc

[PATCH] c++, coroutines: Remove use of coroutine handle in the frame.

2025-06-16 Thread Iain Sandoe
d a temporary coroutine handle. (build_actor_fn): Remove reference to the frame copy of the coroutine handle. (cp_coroutine_transform::wrap_original_function_body): Remove reference to the frame copy of the coroutine handle. Signed-off-by: Iain Sandoe --- gcc

[PATCH] c++, coroutines: Handle unevaluated contexts.

2025-06-14 Thread Iain Sandoe
not allow in an unevaluated context. (finish_co_yield_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/coroutines/unevaluated.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 12 + gcc/testsuite/g++.dg/coroutines/unev

[PATCH] c++, coroutines: Avoid UNKNOWN_LOCATION synthesizing code [PR120273].

2025-06-14 Thread Iain Sandoe
nd diagnostics line number change. * g++.dg/coroutines/coro1-missing-await-method.C: Likewise. * g++.dg/coroutines/pr104051.C: Likewise. * g++.dg/coroutines/pr120273.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 22 ---

Re: [PATCH v2] c++, coroutines: Improve diagnostics for awaiter/promise.

2025-06-14 Thread Iain Sandoe
> On 11 Jun 2025, at 17:51, Jason Merrill wrote: > > On 6/9/25 3:49 PM, Iain Sandoe wrote: >> Hi Jason, >>>> + error_at (loc, "%sawaitable type %qT is not a structure", >>>> + extra, o_type); >>> Generally identifiers s

Re: [PATCH] c++, coroutines: Ensure that the resumer is marked as can_throw.

2025-06-11 Thread Iain Sandoe
> On 11 Jun 2025, at 17:53, Jason Merrill wrote: > > On 6/9/25 3:54 PM, Iain Sandoe wrote: >> I was planning to apply this as obvious - but it is needed for the >> next patch to be posted - so noting here now. I discussed with one >> of the original coroutines pape

Re: [PATCH] libfortran: Simplify Makefile logic

2025-06-11 Thread Iain Sandoe
> On 11 Jun 2025, at 15:17, FX Coudert wrote: > > Hi, > >> I am just wondering if the order in Makefile.am as it is now is needed. E.g. >> pack_* follows pow_* and some other are not lexicographicaly ordered. Are >> there >> dependencies that necessitate this? Or could you just sort them, so

[PATCH] c++, coroutines: Ensure that the resumer is marked as can_throw.

2025-06-09 Thread Iain Sandoe
/cp/ChangeLog: * coroutines.cc (build_actor_fn): Set can_throw. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 18c0a4812c4..d82fa46f208 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc

[PATCH] c++, coroutines: Handle await expressions in assume attributes.

2025-06-09 Thread Iain Sandoe
Hi Jason, There was some discussion of this in the PR116775 comments. In the end I have matched what clang does in this circumstance, since that seems reasonable - and we may ignore the attributes as needed. tested on x86-64-darwin, powerpc64le-linux, OK for trunk? thanks Iain --- 8< --- Here we

[PATCH] c++, coroutines: Handle builtin_constant_p [PR116775].

2025-06-09 Thread Iain Sandoe
hat contains one or more await expressions, then replace the call with its result and discard the unevaluated operand. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr116775.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc |

[PATCH] c++, coroutines: Handle unevaluated contexts

2025-06-09 Thread Iain Sandoe
ated.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 12 ++ gcc/cp/parser.cc | 2 ++ gcc/testsuite/g++.dg/coroutines/unevaluated.C | 24 +++ 3 files changed, 38 insertions(+) create mode 1006

[PATCH v3] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-09 Thread Iain Sandoe
/pr95615-08-initial-suspend-throws-uhe-throws.C: New test. * g++.dg/coroutines/torture/pr95615-09-body-throws-uhe-throws.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 251 ++ .../coroutines/{ => torture}/pr115908.C

[PATCH v2] c++, coroutines: Improve diagnostics for awaiter/promise.

2025-06-09 Thread Iain Sandoe
* g++.dg/coroutines/coro1-missing-await-method.C: Adjust for improved diagnostics. * g++.dg/coroutines/pr104051.C: Move to... * g++.dg/coroutines/pr104051-0.C: ...here. * g++.dg/coroutines/pr104051-1.C: New test. Signed-off-by: Iain Sandoe ---

[PATCH v2] c++, coroutines: Avoid UNKNOWN_LOCATION synthesizing code [PR120273].

2025-06-09 Thread Iain Sandoe
missing-final-suspend.C: Adjust for changed final suspend diagnostics line number change. * g++.dg/coroutines/coro1-missing-await-method.C: Likewise. * g++.dg/coroutines/pr104051.C: Likewise. * g++.dg/coroutines/pr120273.C: New test. Signed-off-by: Iain Sandoe

Re: [PATCH] c-lex: Handle NULL filenames from UNKNOWN_LOCATION [PR120273].

2025-06-03 Thread Iain Sandoe
> On 3 Jun 2025, at 17:03, Jason Merrill wrote: > > On 5/29/25 8:29 AM, Iain Sandoe wrote: >> To trigger this involves somewhat tortuous pathways through the >> c++ requires code. I did consider the alternative of putting in >> an assert and then checking every ca

[PATCH v3] c++: Fix template class lookup [PR120495, PR115605].

2025-06-03 Thread Iain Sandoe
* g++.dg/coroutines/pr120495.C: New test. * g++.dg/pr115605.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/pt.cc | 30 +++- gcc/testsuite/g++.dg/coroutines/pr120495.C | 55 ++ gcc/testsuite/g++.dg/pr115605.C| 10

Re: [PATCH v2] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-03 Thread Iain Sandoe
> On 3 Jun 2025, at 02:36, Jason Merrill wrote: > > On 6/2/25 5:27 PM, Iain Sandoe wrote: >>> On 2 Jun 2025, at 21:17, Jason Merrill wrote: >>> >>> On 6/1/25 3:30 AM, Iain Sandoe wrote: >>>> Updated. I realised we no longer need to refer to

[PATCH v2] c++: Fix template class lookup [PR120495, PR115605].

2025-06-03 Thread Iain Sandoe
provided. PR c++/120495 PR c++/115605 gcc/cp/ChangeLog: * pt.cc (lookup_template_class): Honour provided namespace contexts when looking up class templates. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr120495.C: New test. * g++.dg/pr115605.C: New t

[PATCH] c++: Fix template class lookup [PR120495, PR115605].

2025-06-02 Thread Iain Sandoe
ass templates. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr120495.C: New test. * g++.dg/pr115605.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/pt.cc | 3 +- gcc/testsuite/g++.dg/coroutines/pr120495.C | 55 ++ gcc/testsu

Re: [PATCH v2] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-02 Thread Iain Sandoe
> On 2 Jun 2025, at 21:17, Jason Merrill wrote: > > On 6/1/25 3:30 AM, Iain Sandoe wrote: >> Updated. I realised we no longer need to refer to >> initial_await_resume_called in the ramp at all, v2 removes the setting >> of the variable from there and puts it

Re: [PATCH] c++,coroutines: Lookup coroutine_handle template [PR120495].

2025-06-02 Thread Iain Sandoe
> On 2 Jun 2025, at 17:10, Andrew Pinski wrote: > > On Mon, Jun 2, 2025 at 8:17 AM Jason Merrill wrote: >> >> On 6/2/25 5:13 AM, Iain Sandoe wrote: >>> Tested on x86_64-darwin, OK for trunk? >>> thanks >>> Iain >>> >>>

Re: [PATCH] c++, coroutines: Some cleanups in build_actor_fn.

2025-06-02 Thread Iain Sandoe
> On 2 Jun 2025, at 16:33, Iain Sandoe wrote: > > Hi Jason > >> On 2 Jun 2025, at 16:20, Jason Merrill wrote: >> >> On 5/31/25 3:19 PM, Iain Sandoe wrote: >>> Some small cleanups found while working on other changes, tested >>> on x86_64-dar

Re: [PATCH] c++, coroutines: Some cleanups in build_actor_fn.

2025-06-02 Thread Iain Sandoe
Hi Jason > On 2 Jun 2025, at 16:20, Jason Merrill wrote: > > On 5/31/25 3:19 PM, Iain Sandoe wrote: >> Some small cleanups found while working on other changes, tested >> on x86_64-darwin, OK for trunk? >> thanks >> Iain >> --- 8< --- >> We wer

[PATCH] c++,coroutines: Lookup coroutine_handle template [PR120495].

2025-06-02 Thread Iain Sandoe
off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 17 --- gcc/testsuite/g++.dg/coroutines/pr120495.C | 55 ++ 2 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/g++.dg/coroutines/pr120495.C diff --git a/gcc/cp/coroutines.c

[PATCH v2] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-01 Thread Iain Sandoe
nes/pr115908.C: Move to... * g++.dg/coroutines/torture/pr115908.C: ...here. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 121 +- .../coroutines/{ => torture}/pr115908.C | 9 +- 2 files changed, 60 insertions(+), 70 deletions(-) rename gcc/t

[PATCH] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-05-31 Thread Iain Sandoe
ure/pr115908.C: ...here. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 111 +- .../coroutines/{ => torture}/pr115908.C | 9 +- 2 files changed, 56 insertions(+), 64 deletions(-) rename gcc/testsuite/g++.dg/coroutines/{ => torture}/p

[PATCH] c++, coroutines: Some cleanups in build_actor_fn.

2025-05-31 Thread Iain Sandoe
ons manually rather than using higher-level APIs. gcc/cp/ChangeLog: * coroutines.cc (build_actor_fn): Remove an unused label, guard the frame deallocation correctly, use simpler APIs to build if and return statements. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc |

[PATCH] c++: Emit an error for attempted constexpr co_await [PR118903].

2025-05-30 Thread Iain Sandoe
Log: * constexpr.cc (potential_constant_expression_1): Emit an error when co_await et. al. are used in constexpr contexts. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr118903.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/constexpr.cc|

[PATCH] c++: Add co_await, co_yield and co_return to dump_expr.

2025-05-30 Thread Iain Sandoe
urn. Signed-off-by: Iain Sandoe --- gcc/cp/error.cc | 21 + 1 file changed, 21 insertions(+) diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc index a6a4a8c6212..f14d823a9fc 100644 --- a/gcc/cp/error.cc +++ b/gcc/cp/error.cc @@ -3244,6 +3244,27 @@ dump_expr (cxx_pretty_printer *pp, t

[PATCH] c++, coroutines: Improve diagnostics for awaiter/promise.

2025-05-29 Thread Iain Sandoe
ise. * g++.dg/coroutines/pr104051.C: Likewise. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 21 +++ gcc/cp/coroutines.h | 3 +++ .../coroutines/coro-missing-final-suspend.C | 4 ++-- .../coroutines/coro1-miss

[PATCH] c++, coroutines: Make analyze_fn_params into a class method.

2025-05-29 Thread Iain Sandoe
orm::analyze_fn_parms):... to method. (cp_coroutine_transform::apply_transforms): Adjust call to analyze_fn_parms. * coroutines.h: Declare analyze_fn_parms. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 20 +++- gcc/cp/coroutines.h | 1 + 2 fi

[PATCH] c++, coroutines: Make a check more specific [PR109283].

2025-05-29 Thread Iain Sandoe
pointer if the caller passes a place for it. (flatten_await_stmt): When checking that ternary expressions have been handled, also check that they contain a co_await. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr109283.C: New test. Signed-off-by: Iain Sandoe ---

[pushed] c++, coroutines: Delete now unused code for parm guards.

2025-05-29 Thread Iain Sandoe
s.h (struct param_info): Remove the entry for the parameter copy destructor guard. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 12 +--- gcc/cp/coroutines.h | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc in

[PATCH] c++, coroutines: Simplify initial_await_resume_called.

2025-05-29 Thread Iain Sandoe
orm::wrap_original_function_body): Do not modify the initial_await expression to include the initial_await_resume_called flag here. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 43 --- 1 file changed, 16 insertions(+), 27 deletions(-) d

[PATCH] c-lex: Handle NULL filenames from UNKNOWN_LOCATION [PR120273].

2025-05-29 Thread Iain Sandoe
name pointer, report "". gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr120273.C: New test. Signed-off-by: Iain Sandoe --- gcc/c-family/c-lex.cc | 4 ++ gcc/testsuite/g++.dg/coroutines/pr120273.C | 58 ++ 2 files changed, 62 insertions

[PATCH] c++, coroutines: Fix identification of coroutine ramps [PR120453].

2025-05-29 Thread Iain Sandoe
ery. PR c++/120453 gcc/cp/ChangeLog: * cp-tree.h (DECL_RAMP_P): New. * typeck.cc (check_return_expr): Use DECL_RAMP_P instead of DECL_RAMP_FN. Signed-off-by: Iain Sandoe --- gcc/cp/cp-tree.h | 4 gcc/cp/typeck.cc | 2 +- 2 files changed, 5 insertions(+), 1 delet

[pushed] c++, coroutines: Fix typos in TRUTH_ANDIF_EXPRs.

2025-05-27 Thread Iain Sandoe
Log: * coroutines.cc (cp_coroutine_transform::build_ramp_function): Replace TRUTH_AND_EXPR with TRUTH_ANDIF_EXPR in three places. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc in

Re: [PATCH RFA] fold: DECL_VALUE_EXPR isn't simple [PR120400]

2025-05-26 Thread Iain Sandoe
Hi Jason > On 26 May 2025, at 15:07, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu, OK for trunk? > > Iain, will you verify that one of your coroutine testcases breaks without this > fix? Yes; all current coroutine ramp cleanups are exposed to (potential) UB at -O > 0. This patch reso

[PATCH 4/5 v3] c++, coroutines: Use decltype(auto) for the g_r_o.

2025-05-20 Thread Iain Sandoe
* coroutines.cc (cp_coroutine_transform::build_ramp_function): Use decltype(auto) to determine the type of the temporary get_return_object. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr115908.C: Count promise construction and destruction.

[PATCH 3/5 v3] c++, coroutines: Address CWG2563 return value init [PR119916].

2025-05-20 Thread Iain Sandoe
gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/special-termination-00-sync-completion.C: Amend for CWG2563 expected behaviour. * g++.dg/coroutines/torture/special-termination-01-self-destruct.C: Likewise. * g++.dg/coroutines/torture/pr119916.C: New test.

[PATCH 5/5 v2] c++, coroutines: Clean up the ramp cleanups.

2025-05-16 Thread Iain Sandoe
cleanup try-catch block in the ramp with a series of eh-only cleanup statements. gcc/cp/ChangeLog: * coroutines.cc (cp_coroutine_transform::build_ramp_function): Replace ramp cleanup try-catch block with eh-only cleanup statements. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines

[PATCH v2] c++, coroutines: Use decltype(auto) for the g_r_o.

2025-05-16 Thread Iain Sandoe
ect. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr115908.C: Count promise construction and destruction. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 22 --- gcc/testsuite/g++.dg/coroutines/pr115908.C | 74 +++--- 2 fi

[PATCH v2] c++, coroutines: Address CWG2563 return value init [PR119916].

2025-05-16 Thread Iain Sandoe
-termination-01-self-destruct.C: Likewise. * g++.dg/coroutines/torture/pr119916.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 125 ++ .../g++.dg/coroutines/torture/pr119916.C | 66 + .../special-terminat

Re: [PATCH v2] libstdc++: Preserve the argument type in basic_format_args [PR119246]

2025-05-14 Thread Iain Sandoe
> On 14 May 2025, at 18:42, Rainer Orth wrote: > > Hi Jonathan, > >> On 14/05/25 10:01 +0200, Tomasz Kamiński wrote: >>> This commits adjust the way how the arguments are stored in the _Arg_value >>> (and thus basic_format_args), by preserving the types of fixed width >>> floating-point types

[PATCH v2] c++, coroutines: Fix handling of early exceptions [PR113773].

2025-05-14 Thread Iain Sandoe
h of these flags). gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr113773.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 45 ++--- .../g++.dg/coroutines/torture/pr113773.C | 66 +++ 2 files changed, 102 insert

[PATCH 0/5] Address proposed CWG2563 resolution (BZ 119916).

2025-05-13 Thread Iain Sandoe
he patches have been tested incrementally on x86_64, powerpc64le, aarch64 linux, sparc9 solaris, x86_64 darwin. OK for trunk? and after some bake time 15? thanks Iain ===== Iain Sandoe (5): c++: Set the outer brace marker for missed cases. c++, coroutines: Allow NVRO in more cases for ramp func

[PATCH GCC-14.3] c++, coroutines: Fix handling of early exceptions [PR113773].

2025-05-13 Thread Iain Sandoe
oth of these flags). gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr113773.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 45 ++--- .../g++.dg/coroutines/torture/pr113773.C | 66 +++ 2 files changed,

[PATCH 2/5] c++, coroutines: Allow NVRO in more cases for ramp functions.

2025-05-13 Thread Iain Sandoe
. Special-case ramp functions to allow this. gcc/cp/ChangeLog: * typeck.cc (check_return_expr): Suppress conversions for NVRO in coroutine ramp functions. Signed-off-by: Iain Sandoe --- gcc/cp/typeck.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/cp/typeck.cc b/gcc

[PATCH 4/5] c++, coroutines: Use decltype(auto) for the g_r_o.

2025-05-13 Thread Iain Sandoe
(cp_coroutine_transform::build_ramp_function): Use decltype(auto) to determine the type of the temporary get_return_object. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr115908.C: Count promise construction and destruction. Signed-off-by: Iain Sandoe

[PATCH 5/5] c++, coroutines: Clean up the ramp cleanups.

2025-05-13 Thread Iain Sandoe
This replaces the cleanup try-catch block in the ramp with a series of eh-only cleanup statements. gcc/cp/ChangeLog: * coroutines.cc (cp_coroutine_transform::build_ramp_function): Replace ramp cleanup try-catch block with eh-only cleanup statements. Signed-off-by: Iain

[PATCH 3/5] c++, coroutines: Address CWG2563 return value init [PR119916].

2025-05-13 Thread Iain Sandoe
behaviour. * g++.dg/coroutines/torture/special-termination-01-self-destruct.C: Likewise. * g++.dg/coroutines/torture/pr119916.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 126 ++ .../g++.dg/coroutines/torture

[PATCH 1/5] c++: Set the outer brace marker for missed cases.

2025-05-13 Thread Iain Sandoe
outer brace marker on the body block. This situation occurs for at least coroutine lambda ramp functions and empty CTORs. gcc/cp/ChangeLog: * decl.cc (poplevel): Set BLOCK_OUTER_CURLY_BRACE_P on the body block for functions with no subblocks. Signed-off-by: Iain Sandoe --- gcc/cp

[pushed] libgcobol: Fix bootstrap for targets without program_invocation_short_name

2025-05-06 Thread Iain Sandoe
interface is available). Signed-off-by: Iain Sandoe --- libgcobol/config.h.in | 10 ++ libgcobol/configure| 81 -- libgcobol/configure.ac | 14 +++- libgcobol/libgcobol.cc | 15 ++-- 4 files changed, 114 insertions(+), 6 deletions(-)

Re: [PATCH] cobol: Rewrite exception handling. Partially refactor subscript/refmod calculations.

2025-05-05 Thread Iain Sandoe
Hi Bob, > On 5 May 2025, at 02:49, Robert Dubner wrote: > > I know it's the weekend. But this has been niggling at me, so I decided > to push it. This causes bootstrap to fail on x86_64 darwin with: Undefined symbols for architecture x86_64: "_program_invocation_short_name", referenced from

Re: [PATCH v2] Change __builtin_unreachable to __builtin_trap if only thing in function [PR109267]

2025-04-30 Thread Iain Sandoe
> On 30 Apr 2025, at 09:26, Richard Biener wrote: > > On Wed, Apr 30, 2025 at 9:03 AM Andrew Pinski wrote: >> >> On Tue, Apr 29, 2025 at 11:49 PM Richard Biener >> wrote: >>> >>> On Tue, Apr 29, 2025 at 4:25 PM Andrew Pinski >>> wrote: When we have an empty function, things ca

Re: [PATCH] cfgexpand: Change __builtin_unreachable to __builtin_trap if only thing in function [PR109267]

2025-04-27 Thread Iain Sandoe
> On 27 Apr 2025, at 00:06, Andrew Pinski wrote: > > When we have an empty function, things can go wrong with > cfi_startproc/cfi_endproc and a few other > things like exceptions. So if the only thing the function does is a call to > __builtin_unreachable, > let's expand that to a __builtin_

[pushed] configure, Darwin: Recognise new naming for Xcode ld.

2025-04-15 Thread Iain Sandoe
ng the new name to the set checked. gcc/ChangeLog: * configure: Regenerate. * configure.ac: Recognise PROJECT:ld-.nn.aa as an identifier for Darwin's static linker. Signed-off-by: Iain Sandoe --- gcc/configure| 7 --- gcc/configure.ac | 7 --- 2 f

[PATCH v2] includes, Darwin: Handle modular use for macOS SDKs [PR116827].

2025-04-11 Thread Iain Sandoe
From: Iain Sandoe V2 adds a comment as suggested, otherwise NFC, re-tested on x86_64-Darwin. Unless there are further comments in the next 48h, I plan to apply this (since it is Darwin-specific) and modules is unusable without. thanks, Iain --- 8< --- Recent changes to the OS SDKs h

Re: [PATCH] libgcobol, v2: Handle long double as an alternate IEEE754 128b

2025-04-11 Thread Iain Sandoe
> On 11 Apr 2025, at 08:34, Rainer Orth wrote: > > Hi Jakub, > >> On Wed, Apr 09, 2025 at 02:22:16PM +0200, Rainer Orth wrote: Here is what I'm testing as an incremental fix, so far OK on x86_64-darwin and powerpcle64 (GLIBC 2.34) .. others in progress. Does it help the Solari

Re: [PATCH] libgcobol, v2: Handle long double as an alternate IEEE754 128b

2025-04-10 Thread Iain Sandoe
> On 10 Apr 2025, at 17:36, Jakub Jelinek wrote: > > On Wed, Apr 09, 2025 at 02:22:16PM +0200, Rainer Orth wrote: >>> Here is what I'm testing as an incremental fix, so far OK on x86_64-darwin >>> and powerpcle64 (GLIBC 2.34) .. others in progress. Does it help the >>> Solaris cases? >> >> I

Re: [PATCH v2] aarch64, Darwin: Initial implementation of Apple cores [PR113257].

2025-04-10 Thread Iain Sandoe
.@sandoe.co.uk >>> Cc: Tamar Christina ; GCC Patches >> patc...@gcc.gnu.org>; Alice Carlotti ; Richard >>> Sandiford >>> ; s...@gentoo.org >>> Subject: Re: [PATCH v2] aarch64, Darwin: Initial implementation of Apple >>> cores >>> [PR113257]. >

[pushed] Darwin, libgcobol: Enable for x86_64 Darwin.

2025-04-10 Thread Iain Sandoe
Tested on x86_64 Darwin, Linux, pushed to trunk, thanks Iain --- 8< --- Now that we have libquadmath support, we can enable for x86_64, at least. libgcobol/ChangeLog: * configure.tgt: Enable for x86_64 Darwin. Signed-off-by: Iain Sandoe --- libgcobol/configure.tgt | 2 +- 1 f

[pushed] Darwin: Add spec substitution for static-libgcobol.

2025-04-10 Thread Iain Sandoe
Tested on x86_64 Darwin, Linux, pushed to trunk, thanks Iain --- 8< --- This just follows the common pattern used for other runtime libs. gcc/ChangeLog: * config/darwin.h (LINK_SPEC): Add support for -static-libgcobol. Signed-off-by: Iain Sandoe --- gcc/config/darwin.h

[PATCH] libgcobol: Handle long double as an alternate IEEE754 128b

2025-04-09 Thread Iain Sandoe
TRTOF128: Handle long double as well as __float128. * libgcobol.cc: MOve handling of HAVE_STRTOF128 and HAVE_STRTOF128 to libgcobol-fp.h (format_for_display_internal): Handle long double as an alternate IEEE754 128b float. Signed-off-by: Iain Sandoe --- l

Re: [PATCH 2/2] libgcobol: Allow libgcobol to use libquadmath [PR119244].

2025-04-09 Thread Iain Sandoe
> On 9 Apr 2025, at 09:00, Rainer Orth wrote: > > Jakub Jelinek writes: > >> On Sun, Apr 06, 2025 at 09:02:07AM +0100, Iain Sandoe wrote: >>> >>> + >>> +#if !defined (HAVE_STRTOF128) >>> +# if USE_QUADMATH >>> +# define strto

Re: [PATCH] cobol: Address some iconv issues.

2025-04-07 Thread Iain Sandoe
> On 22 Mar 2025, at 23:13, Robert Dubner wrote: > But, by all means, if you have a fix for something I am not seeing, a fix > that doesn't mess with the status quo ante, then by all means, apply it. I applied the simplest fix possible - which was to remove the trailling // from the conversion

[ping^2] [PATCH] includes, Darwin: Handle modular use for macOS SDKs [PR116827].

2025-04-07 Thread Iain Sandoe
Hi Folks this has more than 2 weeks without comment, (it is darwin-local) thanks Iain > On 29 Mar 2025, at 15:23, Iain Sandoe wrote: > > C++ modules are not really usable on latest Darwin without resolving this, > thanks > Iain > >> On 23 Mar 2025, at 12:29, Iain Sa

Re: [PATCH] cobol: Diagnose ignored SECTIONs [PR119632].

2025-04-07 Thread Iain Sandoe
> On 7 Apr 2025, at 01:19, Simon Sobisch wrote: > > As noted in bug #119632, ignored section segments should be a warning, > ideally with an option to raise that to an error, like -Wignored, which > should be included with -Wall (note bug #119329) and is fine to be also > raised by default (

[PATCH] cobol: Diagnose ignored SECTIONs [PR119632].

2025-04-06 Thread Iain Sandoe
32 gcc/cobol/ChangeLog: * parse.y: Do not sorry on a failed SECTION, print a message and continue. Signed-off-by: Iain Sandoe --- gcc/cobol/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y index 3f282013a4a..7addc

[PATCH 2/2] libgcobol: Allow libgcobol to use libquadmath [PR119244].

2025-04-06 Thread Iain Sandoe
wise. * libgcobol-fp.h: New file. * gfileio.cc: Include libgcobol-fp.h. * libgcobol.spec.in: Add libquadmath configure output. Signed-off-by: Iain Sandoe --- libgcobol/Makefile.am | 9 +- libgcobol/Makefile.in | 14 +- libgcobol/acinclude.m4 | 162 +++ libgcob

[PATCH 0/2] libcobol: Allow the use of libquadmath for 128b FP.

2025-04-06 Thread Iain Sandoe
xxxieee128 --with-long-double-format=ibm uses xxxf128 Thanks to Jakub for the suggestion on handling the long double case. Most of the patch is mechanical - the tricky parts are really in the configuration. OK for trunk? thanks Iain Iain Sandoe (2): testsuite, cobol: Add libquadmath paths

[PATCH 1/2] testsuite, cobol: Add libquadmath paths.

2025-04-06 Thread Iain Sandoe
Even when we are using IEC 128b floating point, the quadmath library can be pulled in 'as needed'. gcc/testsuite/ChangeLog: * lib/cobol.exp: Add libquadmath paths. Signed-off-by: Iain Sandoe --- gcc/testsuite/lib/cobol.exp | 9 + 1 file changed, 9 insertions(+) di

  1   2   3   4   5   6   7   8   9   10   >