[pushed] libgcc, Darwin: Drop the legacy library build for macOS >= 15 [PR116809].

2024-09-24 Thread Iain Sandoe
ngeLog: * config.host: Build legacy libgcc_s.1 on hosts before macOS 15. * config/i386/t-darwin: Remove reference to legacy libgcc_s.1 * config/rs6000/t-darwin: Likewise. * config/t-darwin-libgccs1: New file. Signed-off-by: Iain Sandoe --- libgcc/config.host

[pushed] testsuite, coroutines: Add tests for non-supension ramp returns.

2024-09-22 Thread Iain Sandoe
New test. * g++.dg/coroutines/torture/special-termination-01-self-destruct.C: New test. Signed-off-by: Iain Sandoe --- .../special-termination-00-sync-completion.C | 127 + .../special-termination-01-self-destruct.C| 129 ++ 2 files changed, 256 inserti

[pushed] libgcc, Darwin: From macOS 11, make that the earliest supported.

2024-09-22 Thread Iain Sandoe
PIs that do not exist on earlier OS versions, so limit the libgcc range to macOS11..current. libgcc/ChangeLog: * config.host: From macOS 11, limit earliest macOS support to macOS 11. * config/t-darwin-min-11: New file. Signed-off-by: Iain Sandoe --- libgcc/config.h

Re: [PATCH v2] c++, coroutines: Rework the ramp codegen.

2024-09-20 Thread Iain Sandoe
> On 17 Sep 2024, at 22:05, Jason Merrill wrote: > > On 8/29/24 9:10 PM, Iain Sandoe wrote: >> + /* deref the frame pointer, to use in member access code. */ >> + tree deref_fp >> += cp_build_indirect_ref (loc, coro_fp, RO_UNARY_STAR, >> +

[pushed] Darwin: Allow for as versions that need '-' for std in.

2024-09-20 Thread Iain Sandoe
Log: * config/darwin.h (AS_NEEDS_DASH_FOR_PIPED_INPUT): New. 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 377599074a7..0d8886c026c 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -64

Re: [PATCH RFC] build: update bootstrap req to C++14

2024-09-18 Thread Iain Sandoe
> On 18 Sep 2024, at 17:18, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu with 5.5.0 bootstrap compiler. Thoughts? Despite that adequate support is available in GCC-5.5/6, would it be useful to jump to a version that allows a single toolchain to bootstrap all the currently supported la

Re: [PATCH] c++, coroutines: Fix awaiter var creation [PR116506].

2024-09-17 Thread Iain Sandoe
> On 17 Sep 2024, at 20:06, Jason Merrill wrote: > > On 9/17/24 8:26 PM, Iain Sandoe wrote: >>> On 17 Sep 2024, at 18:24, Jason Merrill wrote: >>> >>> On 8/29/24 5:22 PM, Iain Sandoe wrote: >>>> Tested on x86_64-darwin/linux, powerpc

Re: [PATCH] c++, coroutines: Fix awaiter var creation [PR116506].

2024-09-17 Thread Iain Sandoe
> On 17 Sep 2024, at 18:24, Jason Merrill wrote: > > On 8/29/24 5:22 PM, Iain Sandoe wrote: >> Tested on x86_64-darwin/linux, powerpc64le linux, OK for trunk? >> thanks, >> Iain >> --- >8 --- >> Awaiters always need to have a coroutine state frame c

[ping] Re: [PATCH] c++, coroutines: Fix awaiter var creation [PR116506].

2024-09-17 Thread Iain Sandoe
Hi Jason, gentle ping for this one > On 29 Aug 2024, at 16:22, Iain Sandoe wrote: > > Tested on x86_64-darwin/linux, powerpc64le linux, OK for trunk? > thanks, > Iain > > --- >8 --- > > Awaiters always need to have a coroutine state frame copy since > they pe

[ping] Re: [PATCH v2] c++, coroutines: Rework the ramp codegen.

2024-09-17 Thread Iain Sandoe
Hi Jason, gentle ping for this one. > On 29 Aug 2024, at 20:10, Iain Sandoe wrote: > > Hi Jason, > >>> - char *buf = xasprintf ("_Coro_unnamed_parm_%d", no_name_parm++); >>> + char *buf = xasprintf ("anon%d", parm_num); > >>

Re: [PATCH] c++, coroutines: Fix handling of bool await_suspend() [PR115905].

2024-09-14 Thread Iain Sandoe
Hi Jason, > On 10 Sep 2024, at 20:22, Jason Merrill wrote: > > On 9/7/24 6:45 AM, Iain Sandoe wrote: >> As noted in the PR the action of the existing implementation was to >> treat a false value from await_suspend () as equivalent to "do not >> suspend". A

[PATCH] c++, coroutines: Fix handling of bool await_suspend() [PR115905].

2024-09-07 Thread Iain Sandoe
restart dispatch label. (expand_one_await_expression): Rework to modernise and to handle the boolean await_suspend() case. (build_actor_fn): Rework the dispatcher and allow for a jump back to the dispatcher. gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr115905.C: New tes

Re: [PATCH] c++, coroutines: Instrument missing return_void UB.

2024-09-04 Thread Iain Sandoe
> On 4 Sep 2024, at 17:21, Jason Merrill wrote: > > On 9/1/24 12:17 PM, Iain Sandoe wrote: >> This came up in discussion of an earlier patch. >> I'm in two minds as to whether it's a good idea or not - the underlying >> issue being that libubsan does n

[PATCH] c++, coroutines: Instrument missing return_void UB.

2024-09-01 Thread Iain Sandoe
he target settings). gcc/cp/ChangeLog: * coroutines.cc (cp_coroutine_transform::wrap_original_function_body): Instrument the case where control flows off the end of a coroutine and the user promise has no return_void entry. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 18

[PATCH] c++, coroutines: Revise promise construction/destruction.

2024-08-31 Thread Iain Sandoe
c (cp_coroutine_transform::build_ramp_function): Separate the build of promise constructor and destructor. When evaluating the constructor, check that build_special_member_call returns a valid call expression before adding the statement. Signed-off-by: Iain Sando

[pushed] testsuite, c++, coroutines: Avoid 'unused' warnings [NFC].

2024-08-31 Thread Iain Sandoe
: Likewise. * g++.dg/coroutines/torture/local-var-04-hiding-nested-scopes.C: Likewise. * g++.dg/coroutines/torture/pr109867.C: Likewise. Signed-off-by: Iain Sandoe --- gcc/testsuite/g++.dg/coroutines/coro.h| 4 ++-- .../g++.dg/coroutines/torture/co-

[pushed] testsuite, c++, coroutines: Correct a test intent.

2024-08-31 Thread Iain Sandoe
tly deleted on exception. Signed-off-by: Iain Sandoe --- .../g++.dg/coroutines/torture/pr95615.inc | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr95615.inc b/gcc/testsuite/g++.dg/coroutines/torture/pr95

[PATCH v2] c++, coroutines: Rework the ramp codegen.

2024-08-29 Thread Iain Sandoe
cal variables. (build_coroutine_frame_delete_expr): Amend comment. (cp_coroutine_transform::build_ramp_function): Rework to avoid manual management of variables and scopes. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 302 +++--

[PATCH] c++, coroutines: Fix awaiter var creation [PR116506].

2024-08-29 Thread Iain Sandoe
hat xvalues are materialised. Handle references/pointer values in awaiter access expressions. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr116506.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 39 ++-- gcc/testsuit

[PATCH] c++, coroutines: Rework the ramp codegen.

2024-08-29 Thread Iain Sandoe
to avoid manual management of variables and scopes. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 264 +-- 1 file changed, 129 insertions(+), 135 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 2a1183d70e4..d4d74838

[PATCH] c++, coroutines: Make and use a frame access helper.

2024-08-29 Thread Iain Sandoe
ion): Likewise. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 91 +--- 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index f243fe9adae..2a1183d70e4 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc

[PATCH v2] c++, coroutines: The frame pointer is used in the helpers [PR116482].

2024-08-26 Thread Iain Sandoe
_destroy_function): Make the parameter decls DECL_ARTIFICIAL. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr116482.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 1 + gcc/testsuite/g++.dg/coroutines/pr116482.C | 30 ++

[PATCH] c++, coroutines: The frame pointer is used in the helpers [PR116482].

2024-08-26 Thread Iain Sandoe
roy functions. Fixed thus. PR c++/116482 gcc/cp/ChangeLog: * coroutines.cc (build_actor_fn): Mark the frame pointer as used. (build_destroy_fn): Likewise. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr116482.C: New test. Signed-off-by: Iain Sandoe --- gcc

[PATCH 3/9 v4] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-24 Thread Iain Sandoe
l.C: Use revised diagnostics. * g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C: Likewise. * g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C: Likewise. * g++.dg/coroutines/coro-bad-grooaf-00-static.C: Likewi

Re: [PATCH] c++/coros: do not assume coros don't nest [PR113457]

2024-08-23 Thread Iain Sandoe
Hi Arsen, sorry, I missed one point when I looked through this earlier .. > On 23 Aug 2024, at 20:23, Arsen Arsenović wrote: > > Tested against folly and cppcoro, currently regstrapping on > x86_64-pc-linux-gnu. coroutine.exp and coro-torture.exp passed. > > OK for trunk? (after regstrap) >

[PATCH 5/9 v2] c++, coroutines: Only allow void get_return_object if the ramp is void [PR100476].

2024-08-23 Thread Iain Sandoe
tines/pr102489.C: Avoid void get_return_object. * g++.dg/coroutines/pr103868.C: Likewise. * g++.dg/coroutines/pr94879-folly-1.C: Likewise. * g++.dg/coroutines/pr94883-folly-2.C: Likewise. * g++.dg/coroutines/pr96749-2.C: Likewise. Signed-off-by: Iain Sandoe --- gcc/

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

2024-08-23 Thread Iain Sandoe
(cp_coroutine_transform::build_ramp_function): Only cleanup the frame state on exceptions that occur before the initial await resume has begun. gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr113773.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc

[PATCH 3/9 v3] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-23 Thread Iain Sandoe
revised diagnostics. * g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C: Likewise. * g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C: Likewise. * g++.dg/coroutines/coro-bad-grooaf-00-static.C: Likewise. * g++.dg/coroutines/ra

Re: [PATCH v2] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-22 Thread Iain Sandoe
> On 22 Aug 2024, at 21:27, Jason Merrill wrote: > > On 8/22/24 3:43 PM, Iain Sandoe wrote: >>> On 22 Aug 2024, at 17:47, Jason Merrill wrote: >>> On 8/22/24 12:35 PM, Iain Sandoe wrote: > >>>>>> +build_coroutine_frame_delete_expr (

Re: [PATCH v2] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-22 Thread Iain Sandoe
Hi Jason > On 22 Aug 2024, at 17:47, Jason Merrill wrote: > > On 8/22/24 12:35 PM, Iain Sandoe wrote: >> Hi Jason, >> Firstly, Arsen has WIP to revise the allocation / deallocation to deal with >> coroutine frames that are more aligned than 2 * sizeof (pointe

[PATCH v2] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-22 Thread Iain Sandoe
1-void-gro-non-class-coro.C: Likewise. * g++.dg/coroutines/coro-bad-grooaf-00-static.C: Likewise. * g++.dg/coroutines/ramp-return-b.C: Likewise. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 486 ++ gcc/cp/coroutines.h

[PATCH 3/9 v3] c++, coroutines: Separate the analysis, ramp and outlined function synthesis.

2024-08-22 Thread Iain Sandoe
. * decl.cc (emit_coro_helper): Remove. (finish_function): Revise handling of coroutine transforms. * coroutines.h: New file. Signed-off-by: Iain Sandoe Co-authored-by: Arsen Arsenović --- gcc/cp/coroutines.cc | 647 +++ gcc/

[PATCH v2] c++, coroutines: Separate the analysis, ramp and outlined function synthesis.

2024-08-22 Thread Iain Sandoe
cl.cc (emit_coro_helper): Remove. (finish_function): Revise handling of coroutine transforms. * coroutines.h: New file. Signed-off-by: Iain Sandoe Co-authored-by: Arsen Arsenović --- gcc/cp/coroutines.cc | 646 +++ gcc/cp/coroutines.h | 132 ++

[PATCH v2] c++, coroutines: Split the ramp build into a separate function.

2024-08-22 Thread Iain Sandoe
actor_fn): Arrange to apply any required parameter copy DTORs in reverse order to their creation. (coro_rewrite_function_body): Handle revised param uses. (morph_fn_to_coro): Split the ramp function completion into a separate function. (build_ramp_function): New. Signe

[PATCH v2] c++, coroutines: Tidy up awaiter variable checks.

2024-08-22 Thread Iain Sandoe
rialise the awaiter if it is a prvalue. This re-implements this using core APIs instead of local code. gcc/cp/ChangeLog: * coroutines.cc (build_co_await): Simplify checks for the cases that we need to materialise an awaiter. Signed-off-by: Iain

[PATCH 9/9] c++, coroutines: Look through initial_await target exprs [PR110635].

2024-08-21 Thread Iain Sandoe
-by: Iain Sandoe --- gcc/cp/coroutines.cc | 10 ++- gcc/testsuite/g++.dg/coroutines/pr110635.C | 72 ++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/coroutines/pr110635.C diff --git a/gcc/cp/coroutines.cc b/gcc

[PATCH 3/9] c++, coroutines: Separate allocator work from the ramp body build.

2024-08-21 Thread Iain Sandoe
. * g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C: Likewise. * g++.dg/coroutines/coro-bad-grooaf-00-static.C: Likewise. * g++.dg/coroutines/ramp-return-b.C: Likewise. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 484

[PATCH 8/9] c++, coroutines: Rework handling of throwing_cleanups [PR102051].

2024-08-21 Thread Iain Sandoe
g: * g++.dg/coroutines/pr102051.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 21 + gcc/testsuite/g++.dg/coroutines/pr102051.C | 16 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644

[PATCH 2/9] c++, coroutines: Separate the analysis, ramp and outlined function synthesis.

2024-08-21 Thread Iain Sandoe
o): Remove. * decl.cc (emit_coro_helper): Remove. (finish_function): Revise handling of coroutine transforms. * coroutines.h: New file. Signed-off-by: Iain Sandoe Co-authored-by: Arsen Arsenović --- gcc/cp/coroutines.cc | 635 +++ gcc/cp/co

[PATCH 4/9] c++, coroutines: Fix handling of early exceptions [PR113773].

2024-08-21 Thread Iain Sandoe
state on exceptions that occur before the initial await resume has begun. gcc/testsuite/ChangeLog: * g++.dg/coroutines/torture/pr113773.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 23 +++ .../g++.dg/coroutines/torture/pr113773.C

[PATCH 7/9] c++, coroutines: Fix ordering of return object conversions [PR115908].

2024-08-21 Thread Iain Sandoe
_transform::build_ramp_function): Rework the return value initialisation to initialise the return slot always from get_return_object, even if that implies carrying out conversions to do so. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr115908.C: New test. Signed-of

[PATCH 5/9] c++, coroutines: Only allow void get_return_object if the ramp is void [PR100476].

2024-08-21 Thread Iain Sandoe
: Likewise. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 48 +-- .../coro-bad-gro-01-void-gro-non-class-coro.C | 2 +- gcc/testsuite/g++.dg/coroutines/pr102489.C| 2 +- gcc/testsuite/g++.dg/coroutines/pr103868.C| 2 +- .../g++.dg/coroutines

[PATCH 6/9] c++, coroutines: Allow convertible get_return_on_allocation_fail [PR109682].

2024-08-21 Thread Iain Sandoe
(cp_coroutine_transform::build_ramp_function): Allow for cases where get_return_on_allocation_fail has a type convertible to the ramp return type. gcc/testsuite/ChangeLog: * g++.dg/coroutines/pr109682.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 19

[PATCH 1/9] c++, coroutines: Split the ramp build into a separate function.

2024-08-21 Thread Iain Sandoe
. (build_ramp_function): New. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 360 +++ 1 file changed, 192 insertions(+), 168 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 1f1ea5c2fe4..50362fc3556 100644 --- a/gcc/cp

[PATCH 0/9] c++, coroutines: Patch set for ramp function fixes.

2024-08-21 Thread Iain Sandoe
09867). The series has been tested incrementally against the GCC testsuite, cppcoro and the folly coroutines tests. ----- Iain Sandoe (9): c++, coroutines: Split the ramp build into a separate function. c++, coroutines: Separate the analysis, ramp and outlined function synthesis

[PATCH] c++, coroutines: Tidy up awaiter variable checks.

2024-08-21 Thread Iain Sandoe
ode. gcc/cp/ChangeLog: * coroutines.cc (build_co_await): Simplify checks for the cases that we need to materialise an awaiter. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 59 +--- 1 file changed, 11 insertions(+), 48 deletions(-) d

[pushed] c++, coroutines: Check for malformed functions before splitting.

2024-08-21 Thread Iain Sandoe
ent binding level. gcc/cp/ChangeLog: * coroutines.cc (split_coroutine_body_from_ramp): Check that the binding level is as expected before attempting to outline the function body. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 8 +++- 1 file changed, 7 inserti

Re: [PATCH] c++/coroutines: fix passing *this to promise type, again [PR116327]

2024-08-14 Thread Iain Sandoe
> On 14 Aug 2024, at 05:46, Jason Merrill wrote: > > On 8/13/24 7:52 PM, Patrick Palka wrote: >> On Tue, 13 Aug 2024, Jason Merrill wrote: >>> On 8/12/24 10:01 PM, Patrick Palka wrote: Tested on x86_64-pc-linux-gnu, does this look OK for trunk/14? -- >8 -- In r15-221

Re: [PATCH] c++/coroutines: fix passing *this to promise type, again [PR116327]

2024-08-13 Thread Iain Sandoe
Hi Patrick > On 13 Aug 2024, at 03:01, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/14? > > -- >8 -- > > In r15-2210 we got rid of the unnecessary cast to lvalue reference when > passing *this to the promise type ctor, and as a drive-by change we also > s

Re: [PATCH v2] c++: improve diagnostic of 'return's in coroutines

2024-08-09 Thread Iain Sandoe
> On 9 Aug 2024, at 11:03, Arsen Arsenović wrote: > > Jason Merrill writes: > >> On 8/8/24 4:29 PM, Arsen Arsenović wrote: >>> Tested on x86_64-pc-linux-gnu. I have blinking tsan test results again, >>> but I think they're bogus (I'll re-test on physical hardware before >>> pushing if neede

[pushed] Darwin: Recognise -weak_framework in the driver [PR116237].

2024-08-07 Thread Iain Sandoe
n.h (SUBTARGET_DRIVER_SELF_SPECS): Add a spec for weak_framework. * config/darwin.opt: Handle weak_framework driver option. Signed-off-by: Iain Sandoe --- gcc/config/darwin.h | 2 ++ gcc/config/darwin.opt | 4 2 files changed, 6 insertions(+) diff --git a/gcc/config/darwin.h b/gcc/config/darwi

[PATCH] Ada, libgnarl: Fix s-taprop__posix.adb compilation.

2024-08-07 Thread Iain Sandoe
ada/ChangeLog: * libgnarl/s-taprop__posix.adb (Stack_Guard): Use Interfaces.C.size_t for the type of Page_Size. Signed-off-by: Iain Sandoe --- gcc/ada/libgnarl/s-taprop__posix.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/libgnarl/s-taprop__posix.adb b/gcc/a

[PATCH v2] c++, coroutines: Simplify separation of the user function body and ramp.

2024-08-03 Thread Iain Sandoe
On 2 Aug 2024, at 15:19, Jason Merrill wrote: > On 8/2/24 6:50 AM, Iain Sandoe wrote: >> This version simplifies the process by extrating the second case directly > typo thanks, fixed. >> +static bool >>+use_eh_spec_block (tree fn) >>+{ >>+ return (flag

[PATCH] c++, coroutines: Simplify separation of the user function body and ramp.

2024-08-02 Thread Iain Sandoe
REE trees to discover it. gcc/cp/ChangeLog: * coroutines.cc (use_eh_spec_block): New. (split_coroutine_body_from_ramp): New. (morph_fn_to_coro): Use split_coroutine_body_from_ramp(). Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc |

[pushed] c++, coroutines: Provide a CTOR for a callback object [NFC].

2024-08-02 Thread Iain Sandoe
ata): Add a CTOR. (morph_fn_to_coro): Use CTOR for local_vars_frame_data instead of brace init. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc

[pushed] c++, coroutines: Remove unused suspend point state [NFC].

2024-08-02 Thread Iain Sandoe
Use susp_frame_data CTOR, and make the suspend state hash map local to the morph function. Signed-off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 56 +--- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc

[pushed] c++, coroutines: Fix a typo in checking for void expression types.

2024-08-02 Thread Iain Sandoe
off-by: Iain Sandoe --- gcc/cp/coroutines.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 91bbe6b0a0e..9c1e5f0c5d7 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -3433,7 +3433,7 @@ replace_continue (tree *s

Re: [C++ coroutines 6/6] Testsuite.

2024-07-29 Thread Iain Sandoe
Hi Thomas, > On 29 Jul 2024, at 10:06, Thomas Schwinge wrote: > On 2019-11-17T10:28:26+, Iain Sandoe wrote: >> There are two categories of test: >> >> 1. Checks for correctly formed source code and the error reporting. >> 2. Checks for transformation and code-

Re: [PATCH] c++, contracts: Ensure return statements on checkers.

2024-07-23 Thread Iain Sandoe
> On 23 Jul 2024, at 21:26, Jason Merrill wrote: > > On 6/17/24 8:14 AM, Iain Sandoe wrote: >> This is a minor tidy-up, tested on x86_64-darwin, >> OK For trunk? >> thanks >> Iain >> --- 8< --- >> At present, for pre-conditions and for p

Re: [PATCH] c++/coroutines: correct passing *this to promise type

2024-07-22 Thread Iain Sandoe
Hi Patrick thanks for looking at this. > On 22 Jul 2024, at 14:43, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk > and perhaps backports? > > -- >8 -- > > When passing *this to the promise type ctor (or operator new) (as > per [dcl.fct.def.coroutine]/4), w

Re: [PATCH] c++, coroutines, contracts: Handle coroutine and void functions [PR110871,PR110872,PR115434].

2024-07-16 Thread Iain Sandoe
Hi Jason, > On 15 Jul 2024, at 23:29, Jason Merrill wrote: > > On 7/12/24 1:03 PM, Iain Sandoe wrote: >> >> - More helpful for optimization might be to make the contracts a wrapper >> - function (for non-variadic functions), that could be inlined into a >>

Re: [PATCH] c++, coroutines, contracts: Handle coroutine and void functions [PR110871,PR110872,PR115434].

2024-07-12 Thread Iain Sandoe
HI Jason, > On 9 Jul 2024, at 22:55, Jason Merrill wrote: > > On 7/9/24 11:52 AM, Iain Sandoe wrote: >> Hi Folks >>> On 8 Jul 2024, at 20:57, Jason Merrill wrote: >>> >>> On 7/8/24 3:37 PM, Iain Sandoe wrote: >>>>> On 8 Jul 2024, at 20:

Re: [PATCH v2] Fix Xcode 16 build break with NULL != nullptr

2024-07-12 Thread Iain Sandoe
> On 11 Jul 2024, at 04:35, David Malcolm wrote: > > On Wed, 2024-07-10 at 09:43 +, Daniel Bertalan wrote: >> As of Xcode 16 beta 2 with the macOS 15 SDK, each re-inclusion of the >> stddef.h header causes the NULL macro in C++ to be re-defined to an >> integral constant (__null). This mak

Re: [PATCH] fixincludes: skip stdio_stdarg_h on darwin

2024-07-11 Thread Iain Sandoe
Hi FX > On 11 Jul 2024, at 13:54, FX Coudert wrote: > Sorry about that, thanks for reverting. It appears to be a SDK version issue, > so my analysis of the old SDK versions was incorrect. Could you try (when you > get some time) the attached patch on one of the versions that was broken by > m

Re: [PATCH] fixincludes: skip stdio_stdarg_h on darwin

2024-07-11 Thread Iain Sandoe
> On 10 Jul 2024, at 16:45, Iain Sandoe wrote: >> On 10 Jul 2024, at 16:25, FX Coudert wrote: >> >> I found another useless fixincludes on darwin, but this one was a bit harder >> to diagnose. GCC trunk applies a fix to on modern Darwin: it is >> stdio_st

Re: [PATCH] fixincludes: skip stdio_stdarg_h on darwin

2024-07-10 Thread Iain Sandoe
Hi FX, > On 10 Jul 2024, at 16:25, FX Coudert wrote: > > I found another useless fixincludes on darwin, but this one was a bit harder > to diagnose. GCC trunk applies a fix to on modern Darwin: it is > stdio_stdarg_h. That fix is actually part of a pair, along with > stdio_va_list, and they

Re: [PATCH] fixincludes: add bypass to darwin_objc_runtime_1

2024-07-10 Thread Iain Sandoe
> On 10 Jul 2024, at 14:09, FX Coudert wrote: > > The header that this fix applies to has been fixed in macOS > 15 beta SDK. Therefore, we can include a bypass. shame it’s not fixed earlier :( > Tested on aarch64-apple-darwin24. OK to push? yes OK for tunk (and backports perhaps once mac

Re: [PATCH v2] Fix Xcode 16 build break with NULL != nullptr

2024-07-10 Thread Iain Sandoe
Hello Daniel, Thanks for the patch! > On 10 Jul 2024, at 10:43, Daniel Bertalan wrote: > > As of Xcode 16 beta 2 with the macOS 15 SDK, each re-inclusion of the > stddef.h header causes the NULL macro in C++ to be re-defined to an > integral constant (__null). This makes the workaround in d59a5

Re: [PATCH] c++, coroutines, contracts: Handle coroutine and void functions [PR110871,PR110872,PR115434].

2024-07-09 Thread Iain Sandoe
Hi Folks > On 8 Jul 2024, at 20:57, Jason Merrill wrote: > > On 7/8/24 3:37 PM, Iain Sandoe wrote: >>> On 8 Jul 2024, at 20:19, Jason Merrill wrote: >>> >>> On 6/17/24 8:15 AM, Iain Sandoe wrote: >>>> potentially_transf

Re: [PATCH] c++, coroutines, contracts: Handle coroutine and void functions [PR110871,PR110872,PR115434].

2024-07-08 Thread Iain Sandoe
Hello Jason, before re-working, I think I need some guidance. > On 8 Jul 2024, at 20:19, Jason Merrill wrote: > > On 6/17/24 8:15 AM, Iain Sandoe wrote: >> This patch came out of a discussion on Mattermost about how to deal >> with contracts/coroutines integration. Ac

Re: [PATCH] x86, Darwin: Fix bootstrap for 32b multilibs/hosts.

2024-07-05 Thread Iain Sandoe
> On 5 Jul 2024, at 09:34, Iain Sandoe wrote: > > This is Darwin-local, and I would like to apply it today to restore > bootstrap before my weekend test-runs, tested on x86_64-linux (m32/m64) x86_64-darwin17 (m32/m64) i686-darwin17 (m32/m64) i686-darwin9 (m32/m64) x86_64-d

Re: [PATCH] c++, coroutines, contracts: Handle coroutine and void functions [PR110871,PR110872,PR115434].

2024-07-05 Thread Iain Sandoe
> On 17 Jun 2024, at 13:15, Iain Sandoe wrote: > > This patch came out of a discussion on Mattermost about how to deal > with contracts/coroutines integration. Actually, it would also allow > some semantic checking to be deferred until the same spot - at which > time ther

Re: [PATCH] c++, contracts: Fix ICE in create_tmp_var [PR113968]

2024-07-05 Thread Iain Sandoe
Hi Nina, thanks for the patch! > On 5 Jul 2024, at 15:25, Nina Dinka Ranns wrote: > > Certain places in contract parsing currently do not check for errors. > This results in contracts > with embedded errors which eventually confuse gimplify. Checks for > errors added in > grok_contract() and cp

[PATCH] x86, Darwin: Fix bootstrap for 32b multilibs/hosts.

2024-07-05 Thread Iain Sandoe
i). The change is Darwin-specific. gcc/ChangeLog: * config/i386/i386.cc (ix86_cannot_copy_insn_p): New. (TARGET_CANNOT_COPY_INSN_P): New. Signed-off-by: Iain Sandoe --- gcc/config/i386/i386.cc | 23 +++ 1 file changed, 23 insertions(+) diff --git a/gcc/con

Re: [PATCH 3/3] [x86] Enable flate-combine.

2024-07-03 Thread Iain Sandoe
> On 28 Jun 2024, at 07:03, Uros Bizjak wrote: > > On Fri, Jun 28, 2024 at 7:29 AM liuhongt wrote: >> >> Move pass_stv2 and pass_rpad after pre_reload pass_late_combine, also >> define target_insn_cost to prevent post_reload pass_late_combine to >> revert the optimziation did in pass_rpad. >

Re: [PATCH] libgccjit: Add ability to get the alignment of a type

2024-06-28 Thread Iain Sandoe
Hi Folks, As noted, it seems to me that the fail here is false positives, but it still needs handling. > On 29 Jun 2024, at 02:28, Iain Sandoe wrote: >> On 28 Jun 2024, at 12:50, Rainer Orth wrote: > … I am going to fix this with the obvious (provide a default init for the >

Re: [PATCH] libgccjit: Add ability to get the alignment of a type

2024-06-28 Thread Iain Sandoe
Hi Folks, > On 28 Jun 2024, at 12:50, Rainer Orth wrote: > > David Malcolm writes: > >> On Thu, 2024-04-04 at 18:59 -0400, Antoni Boucher wrote: >>> Hi. >>> This patch adds a new API to produce an rvalue representing the >>> alignment of a type. >>> Thanks for the review. >> >> Patch looks g

Re: [PATCH] fixincludes: adjust stdio fix for macOS 15 headers

2024-06-27 Thread Iain Sandoe
> On 27 Jun 2024, at 17:59, FX Coudert wrote: > > macOS 15 headers move the bulk of the content of to an included > header <_stdio.h> so we apply the “apple_local_stdio_fn_deprecation” > fixinclude to this file also. > > Restores bootstrap on darwin24. > OK to push? OK. thanks for the fix

Re: [PATCH] i386: Remove declaration of unused functions

2024-06-25 Thread Iain Sandoe
> On 25 Jun 2024, at 22:59, Evgeny Karpov wrote: > > The patch fixes the issue introduced in > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=63512c72df09b43d56ac7680cdfd57a66d40c636 > and reported at > https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655599.html . Trivial patches like this

[PATCH] c++, coroutines, contracts: Handle coroutine and void functions [PR110871, PR110872, PR115434].

2024-06-17 Thread Iain Sandoe
g/coroutines/pr110871.C: New test. * g++.dg/coroutines/pr110872.C: New test. Signed-off-by: Iain Sandoe --- gcc/cp/constexpr.cc| 16 ++ gcc/cp/contracts.cc| 249 - gcc/cp/contracts.h

[PATCH] c++, contracts: Ensure return statements on checkers.

2024-06-17 Thread Iain Sandoe
.cc (finish_function_contracts): Add return statements to pre-condition and void post-cndition checking functions. Signed-off-by: Iain Sandoe --- gcc/cp/contracts.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/cp/contracts.cc b/gcc/cp/contracts.cc index 634e3cf4

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Iain Sandoe
> On 11 Jun 2024, at 09:06, Richard Biener wrote: > > On Tue, 11 Jun 2024, Richard Biener wrote: > >> On Tue, 11 Jun 2024, Iain Sandoe wrote: >> >>> >>> >>>> On 11 Jun 2024, at 08:44, Jakub Jelinek wrote: >>>> >>>

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-06-11 Thread Iain Sandoe
> On 11 Jun 2024, at 08:44, Jakub Jelinek wrote: > > On Tue, Jun 11, 2024 at 09:27:37AM +0200, Richard Biener wrote: >> On Tue, 11 Jun 2024, FX Coudert wrote: >> >>> Hi >>> >>> I can’t seem to get a review of this one-line patch. Could a global >>> reviewer help? >> >> While stdio.h can be

Re: [PATCH] fixincludes: bypass some fixes for recent darwin headers

2024-06-07 Thread Iain Sandoe
Hi FX, > On 7 Jun 2024, at 09:57, FX Coudert wrote: > > macOS SDKs sometimes contain non-standard constructs, and require fixes > through fixincludes. However, they are typically fixed in later SDK versions, > although the process can be slow. Fixes have accumulated, which may be needed > on

Re: [PATCH 07/52] darwin: Replace use of LONG_DOUBLE_TYPE_SIZE

2024-06-03 Thread Iain Sandoe
Hi Kewen, > On 3 Jun 2024, at 04:00, Kewen Lin wrote: > > Joseph pointed out "floating types should have their mode, > not a poorly defined precision value" in the discussion[1], > as he and Richi suggested, the existing macros > {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE will be replaced with a > hook mo

Re: [PATCH][14 backport] c++: Fix instantiation of imported temploid friends [PR114275]

2024-05-24 Thread Iain Sandoe
> On 24 May 2024, at 14:54, Jason Merrill wrote: > > On 5/24/24 04:06, Nathaniel Shead wrote: >> On Thu, May 23, 2024 at 06:41:06PM -0400, Jason Merrill wrote: >>> On 5/13/24 07:56, Nathaniel Shead wrote: >> @@ -11751,9 +11767,16 @@ tsubst_friend_class (tree friend_tmpl, tree >> args)

[pshed] testsuite, C++, Darwin: Skip cxa_atexit-6, which is not applicable.

2024-05-19 Thread Iain Sandoe
ite/ChangeLog: * g++.dg/tree-ssa/cxa_atexit-6.C: Skip for Darwin. Signed-off-by: Iain Sandoe --- gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-6.C | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-6.C b/gcc/testsuite/g++.dg/tree-

[pushed] testsuite, darwin: Compile a test without unwind frames.

2024-05-19 Thread Iain Sandoe
-weakimport-3.c: Suppress unwind frames. Signed-off-by: Iain Sandoe --- gcc/testsuite/gcc.dg/darwin-weakimport-3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/darwin-weakimport-3.c b/gcc/testsuite/gcc.dg/darwin-weakimport-3.c index a15b5b0e7cb

Re: Ping [PATCH/RFC] target, hooks: Allow a target to trap on unreachable [PR109267].

2024-05-14 Thread Iain Sandoe
> On 14 May 2024, at 14:29, Richard Biener wrote: > > On Wed, May 8, 2024 at 9:37 PM Iain Sandoe wrote: >> >> Hi Folks, >> >> I’d like to land a viable solution to this issue if possible, (it is a show- >> stopper for the aarch64-darwin development b

Re: Fix gnu versioned namespace mode 00/03

2024-05-12 Thread Iain Sandoe
> On 13 May 2024, at 06:06, François Dumont wrote: > > > On 07/05/2024 18:15, Iain Sandoe wrote: >> Hi François >> >>> On 4 May 2024, at 22:11, François Dumont wrote: >>> >>> Here is the list of patches to restore gnu versioned names

Ping [PATCH/RFC] target, hooks: Allow a target to trap on unreachable [PR109267].

2024-05-08 Thread Iain Sandoe
Hi Folks, I’d like to land a viable solution to this issue if possible, (it is a show- stopper for the aarch64-darwin development branch). > On 9 Apr 2024, at 14:55, Iain Sandoe wrote: > > So far, tested lightly on aarch64-darwin; if this is acceptable then > it will be possible to

Re: Fix gnu versioned namespace mode 00/03

2024-05-07 Thread Iain Sandoe
Hi François > On 4 May 2024, at 22:11, François Dumont wrote: > > Here is the list of patches to restore gnu versioned namespace mode. > > 1/3: Bump gnu version namespace > > This is important to be done first so that once build of gnu versioned > namespace is fixed there is no chance to have

Re: Fix gnu versioned namespace mode 01/03

2024-05-07 Thread Iain Sandoe
Hi François As you know I am keen to see this land - but having had some experience with applying previous patches to actual toolchain builds .. > On 4 May 2024, at 22:11, François Dumont wrote: > > libstdc++: Bump gnu versioned namespace to __9 I think that the namespace version should be a

Re: Trait built-in naming convention

2024-05-02 Thread Iain Sandoe
> On 2 May 2024, at 20:30, Ken Matsui wrote: > > On Thu, May 2, 2024 at 10:54 AM Marek Polacek wrote: >> >> On Thu, May 02, 2024 at 08:37:53PM +0300, Ville Voutilainen wrote: >>> On Thu, 2 May 2024 at 20:25, Ken Matsui wrote: > There was some discussion of how to name the built-ins back

[pushed] Objective-C, NeXT, v2: Correct a regression in code-gen.

2024-05-02 Thread Iain Sandoe
nge. (build_v2_protocol_list_address_table): Likewise. Signed-off-by: Iain Sandoe --- gcc/objc/objc-next-runtime-abi-02.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/objc/objc-next-runtime-abi-02.cc b/gcc/objc/objc-next-runtime-abi-02.cc index cdf559b9bea..248ef641281 100

Re: [PATCH v2] [testsuite] require sqrt_insn effective target where needed

2024-04-23 Thread Iain Sandoe
Hi Folks, > On 23 Apr 2024, at 09:59, Kewen.Lin wrote: > > Hi, > > on 2024/4/22 17:56, Alexandre Oliva wrote: >> This patch takes feedback received for 3 earlier patches, and adopts a >> simpler approach to skip the still-failing tests, that I believe to be >> in line with ppc maintainers' expr

[PATCH] libgfortran: Fix up the autoreconf warnings.

2024-04-18 Thread Iain Sandoe
egenerate. Signed-off-by: Iain Sandoe --- libgfortran/Makefile.am | 1431 +++--- libgfortran/Makefile.in | 9848 ++- 2 files changed, 4126 insertions(+), 7153 deletions(-) diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am index 9f8a4f69863..8bef17

Re: Request for testing on non-Linux targets; remove special casing of /usr/lib and /lib from the driver

2024-04-17 Thread Iain Sandoe
Hi Andrew, > On 17 Apr 2024, at 14:59, Rainer Orth wrote: >> The driver currently will remove "/lib" and "/usr/lib" from the library >> path that gets passed to the linker because it considers them as paths that >> the linker will already known to search. But this is not true for newer >> linke

Re: [PATCH] c++/modules: optimize tree flag streaming

2024-04-13 Thread Iain Sandoe
Hi Patrick, > On 10 Apr 2024, at 17:33, Jason Merrill wrote: > > On 4/10/24 11:26, Patrick Palka wrote: >> On Wed, 10 Apr 2024, Patrick Palka wrote: >>> >>> On Tue, 9 Apr 2024, Jason Merrill wrote: >>> On 2/16/24 10:06, Patrick Palka wrote: > On Thu, 15 Feb 2024, Patrick Palka wrote:

Re: [PATCH] libstdc++: Compile std::allocator instantiations as C++20

2024-04-11 Thread Iain Sandoe
> On 11 Apr 2024, at 18:33, Ville Voutilainen > wrote: > > On Thu, 11 Apr 2024 at 20:22, Jonathan Wakely wrote: >> >> I'm considering this late patch for gcc-14 to workaround an issue >> discovered by a recent Clang change. >> >> I'm not yet sure if Clang is right to require these symbols.

  1   2   3   4   5   6   7   8   9   10   >