GNU bug report logs -
#63365
30.0.50; GCC 13.1 breaks building Emacs with native-compilation
Previous Next
Reported by: Arash Esbati <arash <at> gnu.org>
Date: Mon, 8 May 2023 08:17:02 UTC
Severity: normal
Tags: moreinfo
Merged with 65727
Found in version 30.0.50
Done: Andrea Corallo <acorallo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Interesting, would you mind instead of using 'printf' to try using
> '__attribute__((optimize("O0")))' on the function to verify that the
> issue is really an optimization?
With the following, the build fails:
diff --git a/src/thread.c b/src/thread.c
index 040ca39511e..ffdcf420af0 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -692,6 +692,7 @@ mark_threads_callback (void *ignore)
}
}
+__attribute__((optimize("O0")))
void
mark_threads (void)
{
I hope this was correct? If I replace it with
'__attribute__((optimize("no-optimize-sibling-calls")))', the build
succeeds again.
I therefore tried to compile the entirety of thread.c with -O0
instead, upon which the build succeeded again. I'll try to add the
'__attribute__((optimize("O0")))' in more thread.c functions to see
which ones need it for a successful build (unless you have a better
suggestion?).
To summarize the current state:
thread.c compiled with -O2: build fails
thread.c compiled with -O2 -fno-optimize-sibling-calls: build succeeds
thread.c compiled with -O0: build succeeds
thread.c compiled with -O2 and
- mark_threads with printf: build succeeds
- mark_threads with
__attribute__((optimize("no-optimize-sibling-calls"))): build succeeds
- mark_threads with __attribute__((optimize("O0"))): build fails
This bug report was last modified 1 year and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.