public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "glaubitz at physik dot fu-berlin.de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113341] Using GCC as the bootstrap compiler breaks LLVM on 32-bit PowerPC Date: Sat, 15 Jun 2024 13:44:56 +0000 [thread overview] Message-ID: <bug-113341-4-6Ol7oJ0UUf@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113341-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113341 --- Comment #13 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> --- (In reply to Andrew Pinski from comment #7) > `-fno-lifetime-dse` is already used but I get the feeling there might be > strict aliasing issues in the code though. What happens if you add > -fno-strict-aliasing ? > > This code gives me strict aliasing violation vibes: > ``` > T **getAddressOfPointer(ExternalASTSource *Source) const { > // Ensure the integer is in pointer form. > (void)get(Source); > return reinterpret_cast<T**>(&Ptr); > } > ``` I tried with the following diff but that did not fix the issue: diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 5ca580fbb59c..51c470dcc3ed 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -679,7 +679,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # crash if LLVM is built with GCC and LTO enabled (#57740). Until # these bugs are fixed, we need to disable dead store eliminations # based on object lifetime. - append("-fno-lifetime-dse" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + append("-fno-lifetime-dse -fno-strict-aliasing" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) endif () # Modules enablement for GCC-compatible compilers:
prev parent reply other threads:[~2024-06-15 13:44 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-11 22:07 [Bug target/113341] New: " glaubitz at physik dot fu-berlin.de 2024-01-11 22:13 ` [Bug target/113341] " pinskia at gcc dot gnu.org 2024-01-11 22:14 ` segher at gcc dot gnu.org 2024-01-11 22:18 ` glaubitz at physik dot fu-berlin.de 2024-01-11 22:18 ` pinskia at gcc dot gnu.org 2024-01-11 22:28 ` segher at gcc dot gnu.org 2024-01-11 22:32 ` pinskia at gcc dot gnu.org 2024-01-11 22:38 ` pinskia at gcc dot gnu.org 2024-01-11 22:42 ` jrtc27 at jrtc27 dot com 2024-01-12 8:04 ` linkw at gcc dot gnu.org 2024-06-14 20:29 ` glaubitz at physik dot fu-berlin.de 2024-06-15 12:46 ` glaubitz at physik dot fu-berlin.de 2024-06-15 13:38 ` xry111 at gcc dot gnu.org 2024-06-15 13:44 ` glaubitz at physik dot fu-berlin.de [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113341-4-6Ol7oJ0UUf@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).