Re: [PATCH] Ada, Darwin: Do not link libgcc statically on Darwin [PR108202].

2022-12-30 Thread Iain Sandoe
I would like to revise this patch to be more conservative (only applying to Darwin 8 and 9). > On 24 Dec 2022, at 19:00, Iain Sandoe via Gcc-patches > wrote: > > Tested on i686, x86-64 darwin, x86_64-linux (with a 32b multilib). > OK for trunk? > Iain revised: [PATCH]

Re: [PATCH 4/n] modula-2, driver: Handle static-libstd++ for targets without static/dynamic

2022-12-30 Thread Iain Sandoe
win21. OK for trunk? thanks Iain > On 30 Dec 2022, at 10:58, Iain Sandoe wrote: > > The follows the pattern used in C++ and D drivers to pass -static-libstdc++ > onto the target driver to allow spec substitution of static libraries. > > NOTE: The general handling of Bstatic/dynam

Re: [PATCH] Darwin, crts: Provide scalb and significand as a crt [PR107631]

2022-12-31 Thread Iain Sandoe
Hi Joseph, > On 30 Dec 2022, at 22:26, Joseph Myers wrote: > > On Fri, 30 Dec 2022, Iain Sandoe via Gcc-patches wrote: > >> This patch is providing functions used by the modula-2 implementation. >> >> At present, I've used a crt rather than adding symbols

Re: [PATCH] Darwin, crts: Provide scalb and significand as a crt [PR107631]

2023-01-03 Thread Iain Sandoe
Thanks Joseph, > On 3 Jan 2023, at 18:15, Joseph Myers wrote: > > On Sat, 31 Dec 2022, Iain Sandoe wrote: > >> builtins.def unconditionally defines these builtins to be DEF_EXT_LIB_BUILTIN >> which expands to the libcall, this is currently hard-wired to FALLBACK_P = &g

Re: [PATCH] c++, TLS: Support cross-tu static initialization for targets without alias support [PR106435].

2023-01-03 Thread Iain Sandoe
> On 3 Jan 2023, at 22:22, Jason Merrill wrote: > > On 12/7/22 10:39, Iain Sandoe wrote: >> This has been tested on x86_64 and arm64 Darwin and on x86_64 linux gnu. >> The basic patch is live in the homebrew macOS support and so has had quite >> wide covera

Re: [PATCH] c++, TLS: Support cross-tu static initialization for targets without alias support [PR106435].

2023-01-04 Thread Iain Sandoe
> On 4 Jan 2023, at 15:03, Jason Merrill wrote: > > On 1/3/23 18:17, Iain Sandoe wrote: >>> On 3 Jan 2023, at 22:22, Jason Merrill wrote: >>> >>> On 12/7/22 10:39, Iain Sandoe wrote: >>>> This has been tested on x86_64 and arm64 Darwin and on

Re: [PATCH] modula-2, driver: Implement handling for -static-libgm2.

2023-01-04 Thread Iain Sandoe
Hi Gaius, > On 4 Jan 2023, at 12:11, Gaius Mulley wrote: > > Iain Sandoe writes: > >> tested on x86_64-linux-gnu, x86_64,aarch64-darwin21, > > yes LGTM - it was unimplemented - thanks! My apologies, when I came to apply this I realised that I posted the wr

Re: [PATCH, modula2] PR-108182 gm2 driver mishandles target and multilib options

2023-01-07 Thread Iain Sandoe
> On 6 Jan 2023, at 21:42, Gaius Mulley via Gcc-patches > wrote: > > here are some patches which attempt to allow target specific include > paths and library paths in the gm2 driver. I admit that the patch has > flaws in that it only processes options -f, -m in the lang_specific_driver. > [

Re: [PATCH] Darwin: homogenize spelling of macOS

2023-08-31 Thread Iain Sandoe
Hi FX, +Sandra > On 31 Aug 2023, at 12:13, FX Coudert wrote: > > This patch homogenizes to some extent the use of “Mac OS X” or “OS X” or “Mac > OS” in the gcc/ folder to “macOS”, which is the modern way of writing it. It > is not a global replacement though, and each use was audited. > > -

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-11 Thread Iain Sandoe
> On 11 Nov 2023, at 07:47, Simon Wright wrote: > > On 6 Nov 2023, at 08:36, Arnaud Charlet wrote: >> So without changing fundamentally the model, you can't decide dynamically for the whole system. Making the choice based on the current directory is pretty random, since

[no subject]

2023-11-12 Thread Iain Sandoe
This patch set is not actually particulalry new, I have been maintaining it locally one Darwin branches and it has been tested on several versions of Darwin both with and without Alex's __has_{feature, extension} patch. This is one of the three most significant blockers to importing the macOS SDKs

[PATCH 1/4] c-family: Add handling for clang-style attributes [PR109877].

2023-11-12 Thread Iain Sandoe
rval enclosing the attribute arguments of cases notified as 'clang-form'. PR c++/109877 gcc/c-family/ChangeLog: * c-attribs.cc (attribute_clang_form_p): New. * c-common.h (attribute_clang_form_p): New. Signed-off-by: Iain Sandoe --- gcc/c-family/c-attribs.cc | 12

[PATCH 2/4] c-family, C: handle clang attributes [PR109877].

2023-11-12 Thread Iain Sandoe
ents): New. (c_parser_gnu_attribute): Allow for clang-form GNU-style attributes. Signed-off-by: Iain Sandoe --- gcc/c-family/c-lex.cc | 15 ++ gcc/c-family/c-pragma.h | 3 ++ gcc/c/c-parser.cc | 109 ++-- 3 files changed, 122 insertions(+), 5 deletions(-) di

[PATCH 4/4] Darwin: Implement clang availability attribute [PR109877].

2023-11-12 Thread Iain Sandoe
UM_AV_OSES, NUM_AV_CLAUSES): New. (darwin_handle_availability_attribute): New. (darwin_attribute_takes_identifier_p): New. (darwin_override_options): New. * config/darwin.h (TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): New. Signed-off-by: Iain Sandoe --- gcc/config/darwi

[PATCH 3/4] c-family, C++: Handle clang attributes [PR109877].

2023-11-12 Thread Iain Sandoe
attributes. (cp_parser_gnu_attribute_list): Switch to clang-form parsing where needed. * parser.h : New flag to signal lexing clang-form attributes. Signed-off-by: Iain Sandoe --- gcc/cp/parser.cc | 230 +-- gcc/cp/parser.h | 3 + 2 fil

Re: gfortran.dg/dg.exp debug messages pollute test output

2023-11-13 Thread Iain Sandoe
386-pc-solaris2.11/./libatomic/.libs > > (quite a number of instances). Those messages are from > gfortran.dg/dg.exp, introduced by your patch > > commit a0673ec5f9236dca6ada23f28343c591ccd575e4 > Author: Iain Sandoe > Date: Fri Apr 16 20:01:40 2021 +0100 > >Testsu

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-21 Thread Iain Sandoe
Hello Simon, Arno, > On 17 Nov 2023, at 13:43, Simon Wright wrote: > >> >>> Apple’s naming is definitely confusing in this area! >>> >>> In current SDKs, TARGET_OS_MAC means code is being generated for a Mac OS X >>> variant, >>> which covers OSX, IOS, Watch … ; to determine which kind of de

Re: [PATCH 1/4] libsanitizer: merge from upstream (c425db2eb558c263)

2023-11-21 Thread Iain Sandoe
Hi FX > On 17 Nov 2023, at 11:57, FX Coudert wrote: > >> If they accept it say within a day, wait for it + cherry-pick to GCC, >> otherwise apply to GCC as a local patch in anticipation they accept it. >> If it is all that fixes Darwin support, great. > > With that patch, I can finish bootstrap

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-21 Thread Iain Sandoe
ote: > > On 21 Nov 2023, at 11:22, Iain Sandoe wrote: >> >> Hello Simon, Arno, >> >>> On 17 Nov 2023, at 13:43, Simon Wright wrote: >>> >>>> >>>>> Apple’s naming is definitely confusing in this area! >>>>> &

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-22 Thread Iain Sandoe
Hi FX, > On 17 Nov 2023, at 14:20, FX Coudert wrote: > >>> I have done a full rebuild, and having looked more at the structure of >>> libtool.m4 I am now convinced that having that line outside of the scope of >>> _LT_DARWIN_LINKER_FEATURES is simply wrong (probably a copy-pasto or >>> leftov

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-22 Thread Iain Sandoe
> On 22 Nov 2023, at 13:55, Arnaud Charlet wrote: > #if defined (__APPLE__) -#include >>> >>> If removing unistd.h is intentional (i.e. you determined that it’s no longer >>> needed for Darwin), then we should make that a separate patch. >> >> I thought that I’d had to include uni

[pushed] testsuite: Update path to intl include.

2023-11-22 Thread Iain Sandoe
tly. gcc/testsuite/ChangeLog: * lib/plugin-support.exp: Update the expected path to an in-tree build of libintl. Signed-off-by: Iain Sandoe --- gcc/testsuite/lib/plugin-support.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/lib/plu

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-22 Thread Iain Sandoe
> On 22 Nov 2023, at 14:48, Iain Sandoe wrote: > > > >> On 22 Nov 2023, at 13:55, Arnaud Charlet wrote: >> >>>>> #if defined (__APPLE__) >>>>> -#include >>>> >>>> If removing unistd.h is intentional (i.e. yo

Re: [PATCH] testsuite, Darwin: Add support for Mach-O function body scans.

2023-11-23 Thread Iain Sandoe
Hi Christophe. > On 23 Nov 2023, at 09:02, Christophe Lyon wrote: > > Hi Iain, > > On Mon, 6 Nov 2023 at 11:58, Richard Sandiford > wrote: >> >> Iain Sandoe writes: >>> Hi Richard, >>> >>>> On 5 Nov 2023, at 12:11, Ri

[PATCH] testsuite, lib: Re-allow mulitple function start labels.

2023-11-23 Thread Iain Sandoe
y incorrect case should be easily evident in the assembler). gcc/testsuite/ChangeLog: * lib/scanasm.exp: Allow multiple function start symbols, taking the last as the function name. Signed-off-by: Iain Sandoe --- gcc/testsuite/lib/scanasm.exp | 10 +- 1 file changed, 9 in

Re: [PATCH] testsuite, lib: Re-allow mulitple function start labels.

2023-11-23 Thread Iain Sandoe
Hi > On 23 Nov 2023, at 16:11, Christophe Lyon wrote: > > Hi Iain, > > Thanks for dealing with this :-) > > On Thu, 23 Nov 2023 at 10:58, Iain Sandoe wrote: >> >> Tested on a cross to armv8l-unknown-linux-gnueabihf where the failing >> testcase is r

Re: [PATCH] Update GMP/MPFR/MPC/ISL/gettext to latest release

2023-11-25 Thread Iain Sandoe
> On 25 Nov 2023, at 21:44, Sebastian Huber > wrote: > > On 25.11.23 14:59, Richard Biener wrote: >> On Sat, Nov 25, 2023 at 12:26 PM Sebastian Huber >> wrote: >>> contrib/ChangeLog >> Did you verify an in-tree build with these works and the testsuite >> is clean? > > I was able to build a

Re: [PATCH] Update GMP/MPFR/MPC/ISL/gettext to latest release

2023-11-26 Thread Iain Sandoe
> On 26 Nov 2023, at 10:05, Sebastian Huber > wrote: > > On 26.11.23 01:35, Iain Sandoe wrote: >>> On 25 Nov 2023, at 21:44, Sebastian Huber >>> wrote: >>> >>> On 25.11.23 14:59, Richard Biener wrote: >>>> On Sat, Nov 25,

Re: [PATCH] Update GMP/MPFR/MPC/ISL/gettext to latest release

2023-11-26 Thread Iain Sandoe
> On 26 Nov 2023, at 14:24, Sebastian Huber > wrote: > > On 26.11.23 11:15, Iain Sandoe wrote: >>> On 26 Nov 2023, at 10:05, Sebastian >>> Huber wrote: >>> >>> On 26.11.23 01:35, Iain Sandoe wrote: >>>>> On 25 Nov 2023, at 21

Re: gcc-patches From rewriting mailman settings (Was: [Linaro-TCWG-CI] gcc patch #75674: FAIL: 68 regressions)

2023-09-13 Thread Iain Sandoe
Hi Mark, > On 12 Sep 2023, at 16:00, Mark Wielaard wrote: > Adding Jeff to CC who is the official gcc-patches mailinglist admin. > > On Tue, 2023-09-12 at 11:08 +0400, Maxim Kuvyrkov wrote: >> Normally, notifications from Linaro TCWG precommit CI are sent only to >> patch author and patch submi

Re: [PATCH] core: Support heap-based trampolines

2023-09-16 Thread Iain Sandoe
Hi Richard, > On 14 Sep 2023, at 11:18, Richard Biener wrote: > > On Wed, Sep 6, 2023 at 5:44 PM FX Coudert wrote: >> >> ping**2 on the revised patch, for Richard or another global reviewer. So far >> all review feedback is that it’s a step forward, and it’s been widely used >> for both aar

[pushed] Darwin: Move checking of the 'shared' driver spec.

2023-09-20 Thread Iain Sandoe
Tested on x86_64-darwin21, pushed to trunk, thanks Iain --- 8< --- This avoids a bunch of irrelevant diagnostics if the user passes '-shared' to gnatmake. Currently, we push '-dynamiclib' back onto the command line (since that is the Darwin spelling of 'shared') but this is not handled by gnat1,

[pushed] Darwin: Handle -dynamiclib on cc1 lines.

2023-09-26 Thread Iain Sandoe
n.h (DARWIN_CC1_SPEC): Remove -dynamiclib. Signed-off-by: Iain Sandoe --- gcc/config/darwin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 61e46f76b22..2ee66c1a3d1 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -30

[pushed] Darwin, configure: Allow for an unrecognisable dsymutil [PR111610].

2023-09-27 Thread Iain Sandoe
ename this to DET_UNKNOWN (for Darwin External Toolchain). PR target/111610 gcc/ChangeLog: * configure: Regenerate. * configure.ac: Rename the missing dsymutil case to "DET_UNKNOWN". Signed-off-by: Iain Sandoe --- gcc/configure| 2 +- gcc/configure.ac | 2 +- 2 file

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] 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] 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 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. >

[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] 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

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] 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-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] 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 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] 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] 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: 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-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 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] 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] 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: 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

[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

[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-

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)

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 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

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] 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

[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

[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

[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 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 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 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 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 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 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 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 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 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 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: 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 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 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

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

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 (

[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

[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 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/

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 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

[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 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: 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] 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: 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 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 +++--

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] 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] 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: >>>> >>>

[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

[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

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

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++, 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: [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-

[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

<    1   2   3   4   5   6   7   8   9   10   >