Hi! Re the newlib commit 05a2d7a8b3277b469e7cb121115bba398adc8559 "nvptx: In offloading execution, map '_exit' to 'abort' [GCC PR85463]" that I've just pushes to newlib main branch: On 2023-01-19T23:00:05+0100, I wrote: > This is still not properly resolving > '[nvptx] "exit" in offloaded region doesn't terminate process', but is > one step into that direction, and allows for simplifying some GCC code. > --- a/newlib/libc/machine/nvptx/_exit.c > +++ b/newlib/libc/machine/nvptx/_exit.c > @@ -26,7 +27,15 @@ void __attribute__((noreturn)) > _exit (int status) > { > if (__exitval_ptr) > - *__exitval_ptr = status; > - for (;;) > - asm ("exit;" ::: "memory"); > + { > + *__exitval_ptr = status; > + for (;;) > + asm ("exit;" ::: "memory"); > + } > + else /* offloading */ > + { > + /* Map to 'abort'; see > + '[nvptx] "exit" in offloaded region doesn't terminate process'. */ > + abort (); > + } > } That has put "the PR85463 stuff" into the one central place, and allows for simplifying GCC as per the attached 'Clean up after newlib "nvptx: In offloading execution, map '_exit' to 'abort' [GCC PR85463]"', which I've just pushed to GCC devel/omp/gcc-12 branch in commit 094b379f461bb4b635327cde26eabc0966159fec, and intend to push to GCC master branch once the latter depends on updated newlib for other (functional) reasons. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955