As mentioned in PR91913, the issue reported there for ARM affects SH as well when building webkit2gtk on Debian sh4: (sid-sh4-sbuild)root@nofan:/build/webkit2gtk-huItPy/webkit2gtk-2.26.4/build# g++-9 -DANGLE_ENABLE_ESSL -DANGLE_ENABLE_GLSL -DBUILDING_GTK__=1 -DBUILDING_WITH_CMAKE=1 -DEGL_EGL_PROTOTYPES=0 -DGETTEXT_PACKAGE=\"WebKit2GTK-4.0\" -DGL_GLES_PROTOTYPES=0 -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DLIBANGLE_IMPLEMENTATION -DWEBKITGTK_API_VERSION_STRING=\"4.0\" -I../Source/ThirdParty/ANGLE/include -I../Source/ThirdParty/ANGLE/include/KHR -I../Source/ThirdParty/ANGLE/src -I../Source/ThirdParty/ANGLE/src/common/third_party/base -fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-psabi -Wno-noexcept-type -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -g1 -O2 -fdebug-prefix-map=/build/webkit2gtk-huItPy/=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -mlra -DNDEBUG -DG_DISABLE_CAST_CHECKS -fno-strict-aliasing -fno-exceptions -fno-rtti -fPIC -Wno-cast-align -Wno-suggest-attribute=format -Wno-type-limits -Wno-undef -Wno-unused-parameter -std=c++17 -MD -MT Source/ThirdParty/ANGLE/CMakeFiles/ANGLE.dir/src/compiler/translator/IntermNode.cpp.o -MF Source/ThirdParty/ANGLE/CMakeFiles/ANGLE.dir/src/compiler/translator/IntermNode.cpp.o.d -o Source/ThirdParty/ANGLE/CMakeFiles/ANGLE.dir/src/compiler/translator/IntermNode.cpp.o -c ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp: In static member function 'static sh::TConstantUnion* sh::TIntermConstantUnion::FoldAggregateBuiltIn(sh::TIntermAggregate*, sh::TDiagnostics*)': ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp:3747:1: error: insn does not satisfy its constraints: 3747 | } | ^ (insn 9655 9654 3155 385 (parallel [ (set (reg:SF 66 fr2 [orig:645 _696 ] [645]) (reg:SF 0 r0 [3233])) (use (reg:SI 154 fpscr0)) (clobber (scratch:SI)) ]) 214 {movsf_ie} (expr_list:REG_DEAD (reg:SF 0 r0 [3233]) (nil))) during RTL pass: cprop_hardreg ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp:3747:1: internal compiler error: in extract_constrain_insn, at recog.c:2211
Created attachment 47886 [details] Source and preprocessed source plus assembly
This bug does not affect gcc-8. It affects gcc-9 and gcc-10. Using -mlra does not help.
Building with -O1 instead of -O2 helps. I can try to bisect the optimization flag which causes this problem later.
Passing -fno-move-loop-invariants to the command line fixes the problem for me.
Hmm, there is one other source code file within webkit2gtk where -fno-move-loop-invariants does not help. I can only get that particular source file to be compiled if I disable all optimizations. I tried bisecting the flags between -O0 and -O1 but that didn't work as I expected, unfortunately. So, I guess we can't compile webkit2gtk until this bug has been fixed :(.
(In reply to John Paul Adrian Glaubitz from comment #5) > Hmm, there is one other source code file within webkit2gtk where > -fno-move-loop-invariants does not help. I can only get that particular > source file to be compiled if I disable all optimizations. As always, just because the error message seems to be the same, doesn't mean it's the same issue/bug in the compiler. Please post the other failing code, too.
Created attachment 47907 [details] Source and preprocessed source plus assembly, second case Here are the saved temps for the second case for which -fno-move-loop-invariants does not help: /usr/bin/c++ -save-temps -DBUILDING_GTK__=1 -DBUILDING_WEBKIT -DBUILDING_WITH_CMAKE=1 -DBUILDING_WebCore -DGETTEXT_PACKAGE=\"WebKit2GTK-4.0\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DSTATICALLY_LINKED_WITH_PAL=1 -DWEBKITGTK_API_VERSION_STRING=\"4.0\" -IDerivedSources/ForwardingHeaders -I../Source/WebCore/platform/graphics/libwpe -I. -IDerivedSources/WebCore -I../Source/WebCore -I../Source/WebCore/Modules/airplay -I../Source/WebCore/Modules/applepay -I../Source/WebCore/Modules/applepay/paymentrequest -I../Source/WebCore/Modules/applicationmanifest -I../Source/WebCore/Modules/beacon -I../Source/WebCore/Modules/cache -I../Source/WebCore/Modules/credentialmanagement -I../Source/WebCore/Modules/encryptedmedia -I../Source/WebCore/Modules/encryptedmedia/legacy -I../Source/WebCore/Modules/entriesapi -I../Source/WebCore/Modules/fetch -I../Source/WebCore/Modules/geolocation -I../Source/WebCore/Modules/indexeddb -I../Source/WebCore/Modules/indexeddb/client -I../Source/WebCore/Modules/indexeddb/server -I../Source/WebCore/Modules/indexeddb/shared -I../Source/WebCore/Modules/mediacapabilities -I../Source/WebCore/Modules/mediacontrols -I../Source/WebCore/Modules/mediarecorder -I../Source/WebCore/Modules/mediasession -I../Source/WebCore/Modules/mediasource -I../Source/WebCore/Modules/mediastream -I../Source/WebCore/Modules/mediastream/libwebrtc -I../Source/WebCore/Modules/navigatorcontentutils -I../Source/WebCore/Modules/notifications -I../Source/WebCore/Modules/paymentrequest -I../Source/WebCore/Modules/plugins -I../Source/WebCore/Modules/quota -I../Source/WebCore/Modules/speech -I../Source/WebCore/Modules/streams -I../Source/WebCore/Modules/webaudio -I../Source/WebCore/Modules/webauthn -I../Source/WebCore/Modules/webauthn/cbor -I../Source/WebCore/Modules/webauthn/fido -I../Source/WebCore/Modules/webdatabase -I../Source/WebCore/Modules/webdriver -I../Source/WebCore/Modules/webgpu -I../Source/WebCore/Modules/webgpu/WHLSL -I../Source/WebCore/Modules/webgpu/WHLSL/AST -I../Source/WebCore/Modules/websockets -I../Source/WebCore/Modules/webvr -I../Source/WebCore/accessibility -I../Source/WebCore/accessibility/isolatedtree -I../Source/WebCore/animation -I../Source/WebCore/bindings -I../Source/WebCore/bindings/js -I../Source/WebCore/bridge -I../Source/WebCore/bridge/c -I../Source/WebCore/bridge/jsc -I../Source/WebCore/contentextensions -I../Source/WebCore/crypto -I../Source/WebCore/crypto/algorithms -I../Source/WebCore/crypto/keys -I../Source/WebCore/crypto/parameters -I../Source/WebCore/css -I../Source/WebCore/css/parser -I../Source/WebCore/css/typedom -I../Source/WebCore/cssjit -I../Source/WebCore/dom -I../Source/WebCore/dom/messageports -I../Source/WebCore/domjit -I../Source/WebCore/editing -I../Source/WebCore/fileapi -I../Source/WebCore/history -I../Source/WebCore/html -I../Source/WebCore/html/canvas -I../Source/WebCore/html/forms -I../Source/WebCore/html/parser -I../Source/WebCore/html/shadow -I../Source/WebCore/html/track -I../Source/WebCore/inspector -I../Source/WebCore/inspector/agents -I../Source/WebCore/inspector/agents/page -I../Source/WebCore/inspector/agents/worker -I../Source/WebCore/layout -I../Source/WebCore/layout/blockformatting -I../Source/WebCore/layout/displaytree -I../Source/WebCore/layout/floats -I../Source/WebCore/layout/inlineformatting -I../Source/WebCore/layout/inlineformatting/text -I../Source/WebCore/layout/layouttree -I../Source/WebCore/loader -I../Source/WebCore/loader/appcache -I../Source/WebCore/loader/archive -I../Source/WebCore/loader/archive/mhtml -I../Source/WebCore/loader/cache -I../Source/WebCore/loader/icon -I../Source/WebCore/mathml -I../Source/WebCore/page -I../Source/WebCore/page/animation -I../Source/WebCore/page/csp -I../Source/WebCore/page/scrolling -I../Source/WebCore/platform -I../Source/WebCore/platform/animation -I../Source/WebCore/platform/audio -I../Source/WebCore/platform/encryptedmedia -I../Source/WebCore/platform/gamepad -I../Source/WebCore/platform/graphics -I../Source/WebCore/platform/graphics/cpu/arm -I../Source/WebCore/platform/graphics/cpu/arm/filters -I../Source/WebCore/platform/graphics/displaylists -I../Source/WebCore/platform/graphics/filters -I../Source/WebCore/platform/graphics/iso -I../Source/WebCore/platform/graphics/opentype -I../Source/WebCore/platform/graphics/transforms -I../Source/WebCore/platform/mediacapabilities -I../Source/WebCore/platform/mediarecorder -I../Source/WebCore/platform/mediasession -I../Source/WebCore/platform/mediastream -I../Source/WebCore/platform/mediastream/libwebrtc -I../Source/WebCore/platform/mock -I../Source/WebCore/platform/mock/mediasource -I../Source/WebCore/platform/network -I../Source/WebCore/platform/sql -I../Source/WebCore/platform/text -I../Source/WebCore/platform/vr -I../Source/WebCore/plugins -I../Source/WebCore/rendering -I../Source/WebCore/rendering/line -I../Source/WebCore/rendering/mathml -I../Source/WebCore/rendering/shapes -I../Source/WebCore/rendering/style -I../Source/WebCore/rendering/svg -I../Source/WebCore/rendering/updating -I../Source/WebCore/replay -I../Source/WebCore/storage -I../Source/WebCore/style -I../Source/WebCore/svg -I../Source/WebCore/svg/animation -I../Source/WebCore/svg/graphics -I../Source/WebCore/svg/graphics/filters -I../Source/WebCore/svg/properties -I../Source/WebCore/websockets -I../Source/WebCore/workers -I../Source/WebCore/workers/service -I../Source/WebCore/workers/service/context -I../Source/WebCore/workers/service/server -I../Source/WebCore/worklets -I../Source/WebCore/xml -I../Source/WebCore/xml/parser -I../Source/WebCore/platform/graphics/gpu -I../Source/ThirdParty/xdgmime/src -I../Source/WebCore/platform/graphics/cairo -I../Source/WebCore/platform/graphics/freetype -I../Source/WebCore/platform/graphics/harfbuzz -I../Source/WebCore/platform/graphics/harfbuzz/ng -I../Source/WebCore/platform/graphics/gstreamer -I../Source/WebCore/platform/graphics/gstreamer/mse -I../Source/WebCore/platform/graphics/gstreamer/eme -I../Source/WebCore/platform/audio/gstreamer -I../Source/WebCore/platform/image-decoders -I../Source/WebCore/platform/image-decoders/bmp -I../Source/WebCore/platform/image-decoders/gif -I../Source/WebCore/platform/image-decoders/ico -I../Source/WebCore/platform/image-decoders/jpeg -I../Source/WebCore/platform/image-decoders/jpeg2000 -I../Source/WebCore/platform/image-decoders/png -I../Source/WebCore/platform/image-decoders/webp -I../Source/WebCore/platform/network/soup -I../Source/WebCore/platform/graphics/texmap -I../Source/WebCore/platform/graphics/nicosia -I../Source/WebCore/page/scrolling/nicosia -I../Source/WebCore/platform/graphics/texmap/coordinated -I../Source/WebCore/platform/graphics/nicosia/cairo -I../Source/WebCore/platform/graphics/nicosia/texmap -I../Source/WebCore/accessibility/atk -I../Source/WebCore/editing/atk -I../Source/WebCore/page/gtk -I../Source/WebCore/platform/generic -I../Source/WebCore/platform/gtk -I../Source/WebCore/platform/graphics/egl -I../Source/WebCore/platform/graphics/glx -I../Source/WebCore/platform/graphics/gtk -I../Source/WebCore/platform/graphics/opengl -I../Source/WebCore/platform/graphics/wayland -I../Source/WebCore/platform/graphics/x11 -I../Source/WebCore/platform/mediastream/gtk -I../Source/WebCore/platform/mediastream/gstreamer -I../Source/WebCore/platform/network/gtk -I../Source/WebCore/platform/text/gtk -IDerivedSources -I../Source/ThirdParty -isystem /usr/include/libxml2 -isystem /usr/include/cairo -isystem /usr/include/freetype2 -isystem /usr/include/harfbuzz -isystem /usr/include/gstreamer-1.0 -isystem /usr/include/glib-2.0 -isystem /usr/lib/sh4-linux-gnu/glib-2.0/include -isystem /usr/include/orc-0.4 -isystem /usr/lib/sh4-linux-gnu/gstreamer-1.0/include -isystem /usr/include/libdrm -isystem /usr/include/openjpeg-2.3 -isystem /usr/include/libsoup-2.4 -isystem /usr/include/atk-1.0 -isystem /usr/include/enchant-2 -isystem /usr/include/gtk-3.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/fribidi -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/pixman-1 -isystem /usr/include/uuid -isystem /usr/include/libpng16 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/sh4-linux-gnu/dbus-1.0/include -isystem /usr/include/libsecret-1 -isystem /usr/include/wpe-1.0 -fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-psabi -Wno-noexcept-type -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -g1 -fdebug-prefix-map=//build/webkit2gtk-QyBTFj/webkit2gtk-2.26.4/build=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -mlra -fno-move-loop-invariants -DNDEBUG -DG_DISABLE_CAST_CHECKS -fno-strict-aliasing -fno-exceptions -fno-rtti -fPIC -std=c++17 -MD -MT Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-7.cpp.o -MF Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-7.cpp.o.d -o Source/WebCore/CMakeFiles/WebCore.dir/__/__/DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-7.cpp.o -c DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-7.cpp -O2 In file included from DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:33, from DerivedSources/ForwardingHeaders/wtf/text/UniquedStringImpl.h:28, from DerivedSources/ForwardingHeaders/wtf/text/AtomStringImpl.h:23, from DerivedSources/ForwardingHeaders/wtf/text/AtomString.h:25, from DerivedSources/ForwardingHeaders/wtf/text/StringHash.h:25, from DerivedSources/ForwardingHeaders/wtf/JSONValues.h:36, from ../Source/WebCore/platform/graphics/IntSize.h:29, from ../Source/WebCore/platform/graphics/IntPoint.h:28, from ../Source/WebCore/platform/graphics/FloatSize.h:30, from ../Source/WebCore/platform/DragImage.h:28, from ../Source/WebCore/platform/Pasteboard.h:28, from ../Source/WebCore/platform/StaticPasteboard.h:28, from ../Source/WebCore/platform/StaticPasteboard.cpp:27, from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-7.cpp:1: DerivedSources/ForwardingHeaders/wtf/text/ASCIIFastPath.h: In instantiation of ‘bool WTF::charactersAreAllASCII(const CharacterType*, size_t) [with CharacterType = unsigned char; size_t = unsigned int]’: DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:812:61: required from here DerivedSources/ForwardingHeaders/wtf/text/ASCIIFastPath.h:95:26: warning: cast from ‘const unsigned char*’ to ‘const MachineWord*’ {aka ‘const unsigned int*’} increases required alignment of target type [-Wcast-align] 95 | allCharBits |= *(reinterpret_cast_ptr<const MachineWord*>(characters)); | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DerivedSources/ForwardingHeaders/wtf/text/ASCIIFastPath.h: In instantiation of ‘bool WTF::charactersAreAllASCII(const CharacterType*, size_t) [with CharacterType = char16_t; size_t = unsigned int]’: DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:813:58: required from here DerivedSources/ForwardingHeaders/wtf/text/ASCIIFastPath.h:95:26: warning: cast from ‘const char16_t*’ to ‘const MachineWord*’ {aka ‘const unsigned int*’} increases required alignment of target type [-Wcast-align] In file included from DerivedSources/ForwardingHeaders/wtf/text/UniquedStringImpl.h:28, from DerivedSources/ForwardingHeaders/wtf/text/AtomStringImpl.h:23, from DerivedSources/ForwardingHeaders/wtf/text/AtomString.h:25, from DerivedSources/ForwardingHeaders/wtf/text/StringHash.h:25, from DerivedSources/ForwardingHeaders/wtf/JSONValues.h:36, from ../Source/WebCore/platform/graphics/IntSize.h:29, from ../Source/WebCore/platform/graphics/IntPoint.h:28, from ../Source/WebCore/platform/graphics/FloatSize.h:30, from ../Source/WebCore/platform/DragImage.h:28, from ../Source/WebCore/platform/Pasteboard.h:28, from ../Source/WebCore/platform/StaticPasteboard.h:28, from ../Source/WebCore/platform/StaticPasteboard.cpp:27, from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-7.cpp:1: DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h: In instantiation of ‘T* WTF::StringImpl::tailPointer() [with T = char16_t]’: DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:853:71: required from here DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:1161:12: warning: cast from ‘uint8_t*’ {aka ‘unsigned char*’} to ‘char16_t*’ increases required alignment of target type [-Wcast-align] 1161 | return reinterpret_cast_ptr<T*>(reinterpret_cast<uint8_t*>(this) + tailOffset<T>()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h: In instantiation of ‘const T* WTF::StringImpl::tailPointer() const [with T = char16_t]’: DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:1151:43: required from here DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:1156:12: warning: cast from ‘const uint8_t*’ {aka ‘const unsigned char*’} to ‘const char16_t*’ increases required alignment of target type [-Wcast-align] 1156 | return reinterpret_cast_ptr<const T*>(reinterpret_cast<const uint8_t*>(this) + tailOffset<T>()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h: In instantiation of ‘const T* WTF::StringImpl::tailPointer() const [with T = WTF::StringImpl*]’: DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:1168:38: required from here DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:1156:12: warning: cast from ‘const uint8_t*’ {aka ‘const unsigned char*’} to ‘WTF::StringImpl* const*’ increases required alignment of target type [-Wcast-align] DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h: In instantiation of ‘T* WTF::StringImpl::tailPointer() [with T = WTF::StringImpl*]’: DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:1175:38: required from here DerivedSources/ForwardingHeaders/wtf/text/StringImpl.h:1161:12: warning: cast from ‘uint8_t*’ {aka ‘unsigned char*’} to ‘WTF::StringImpl**’ increases required alignment of target type [-Wcast-align] 1161 | return reinterpret_cast_ptr<T*>(reinterpret_cast<uint8_t*>(this) + tailOffset<T>()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../Source/WebCore/platform/graphics/FontCascadeDescription.h:29, from ../Source/WebCore/platform/graphics/FontCascade.h:29, from ../Source/WebCore/platform/graphics/GraphicsContext.h:31, from ../Source/WebCore/platform/Theme.cpp:29, from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-7.cpp:2: DerivedSources/ForwardingHeaders/wtf/RefCountedArray.h: In instantiation of ‘T* WTF::RefCountedArray<T, PtrTraits>::Header::payload() [with T = WTF::AtomString; PtrTraits = WTF::DumbPtrTraits<WTF::AtomString>]’: DerivedSources/ForwardingHeaders/wtf/RefCountedArray.h:70:12: required from ‘WTF::RefCountedArray<T, PtrTraits>::RefCountedArray(size_t) [with T = WTF::AtomString; PtrTraits = WTF::DumbPtrTraits<WTF::AtomString>; size_t = unsigned int]’ ../Source/WebCore/platform/graphics/FontCascadeDescription.h:138:48: required from here DerivedSources/ForwardingHeaders/wtf/RefCountedArray.h:225:20: warning: cast from ‘char*’ to ‘WTF::AtomString*’ increases required alignment of target type [-Wcast-align] 225 | return reinterpret_cast_ptr<T*>(result); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ DerivedSources/ForwardingHeaders/wtf/RefCountedArray.h: In instantiation of ‘static WTF::RefCountedArray<T, PtrTraits>::Header* WTF::RefCountedArray<T, PtrTraits>::Header::fromPayload(T*) [with T = WTF::AtomString; PtrTraits = WTF::DumbPtrTraits<WTF::AtomString>]’: DerivedSources/ForwardingHeaders/wtf/RefCountedArray.h:72:28: required from ‘WTF::RefCountedArray<T, PtrTraits>::RefCountedArray(size_t) [with T = WTF::AtomString; PtrTraits = WTF::DumbPtrTraits<WTF::AtomString>; size_t = unsigned int]’ ../Source/WebCore/platform/graphics/FontCascadeDescription.h:138:48: required from here DerivedSources/ForwardingHeaders/wtf/RefCountedArray.h:230:20: warning: cast from ‘char*’ to ‘WTF::RefCountedArray<WTF::AtomString>::Header*’ increases required alignment of target type [-Wcast-align] 230 | return reinterpret_cast_ptr<Header*>(reinterpret_cast<char*>(payload) - size()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from DerivedSources/WebCore/unified-sources/UnifiedSource-3c72abbe-7.cpp:2: ../Source/WebCore/platform/Theme.cpp: In function ‘virtual void WebCore::Theme::drawNamedImage(const WTF::String&, WebCore::GraphicsContext&, const WebCore::FloatRect&) const’: ../Source/WebCore/platform/Theme.cpp:155:1: error: insn does not satisfy its constraints: 155 | } | ^ (insn 1370 1369 63 2 (parallel [ (set (reg:SF 65 fr1 [1270]) (reg:SF 0 r0 [1271])) (use (reg:SI 154 fpscr0)) (clobber (scratch:SI)) ]) "../Source/WebCore/platform/graphics/FloatPoint.h":69:49 214 {movsf_ie} (expr_list:REG_DEAD (reg:SF 0 r0 [1271]) (nil))) during RTL pass: cprop_hardreg ../Source/WebCore/platform/Theme.cpp:155:1: internal compiler error: in extract_constrain_insn, at recog.c:2211
The second case compiles fine with gcc-8 as well, but fails with g++-9 and g++-10.
The "movsf_ie" insn doesn't allow FP reg -> GP reg moves in its constraints, but it allows it in its predicates "general_movdst_operand" and "general_movsrc_operand". I will have a look and try to correct it.
I can't reproduce the first case with a standalone sh-elf compiler (GCC 9). The compile flags mention -specs=/usr/share/dpkg/pie-compile.specs ... what's in that specs file?
(In reply to Oleg Endo from comment #10) > I can't reproduce the first case with a standalone sh-elf compiler (GCC 9). > > The compile flags mention > > -specs=/usr/share/dpkg/pie-compile.specs > > ... what's in that specs file? (sid-sh4-sbuild)root@sh4-gandi-02:~# cat /usr/share/dpkg/pie-compile.specs *self_spec: + %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:%{!fno-PIE:%{!no-pie:-fPIE}}}}}}}} So, since -fPIC is provided on the command line already, it shouldn't be doing anything.
This looks to be an LRA related issue (checking with GCC 10). Without -mlra it actually compiles fine. Adding -mlra causes some issues: sh-elf-g++ -m4 -ml -matomic-model=soft-gusa -O2 -fno-strict-aliasing -fno-exceptions -fno-rtti -fPIC -fstack-protector-strong -std=c++17 -mlra ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp: In static member function 'static sh::TConstantUnion* sh::TIntermConstantUnion::FoldAggregateBuiltIn(sh::TIntermAggregate*, sh::TDiagnostics*)': ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp:3747:1: error: insn does not satisfy its constraints: (insn 9652 9651 3240 388 (parallel [ (set (reg:SF 66 fr2 [orig:662 _764 ] [662]) (reg:SF 0 r0 [3347])) (use (reg:SI 154 fpscr0)) (clobber (scratch:SI)) ]) "../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp":3568:60 214 {movsf_ie} (expr_list:REG_DEAD (reg:SF 0 r0 [3347]) (nil))) during RTL pass: cprop_hardreg ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp:3747:1: internal compiler error: in extract_constrain_insn, at recog.c:2195 0x5dee99 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/gcc/rtl-error.c:108 0x5deec2 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc/gcc/rtl-error.c:118 0xe46907 extract_constrain_insn(rtx_insn*) ../../gcc/gcc/recog.c:2195 0xe4a204 copyprop_hardreg_forward_1 ../../gcc/gcc/regcprop.c:802 0xe4b212 execute ../../gcc/gcc/regcprop.c:1367 sh-elf-g++ -m4 -ml -matomic-model=soft-gusa -O2 -std=c++17 -mlra during RTL pass: reload ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp: In member function 'sh::TConstantUnion* sh::TIntermConstantUnion::foldUnaryComponentWise(TOperator, sh::TDiagnostics*)': ../Source/ThirdParty/ANGLE/src/compiler/translator/IntermNode.cpp:3047:1: internal compiler error: in lra_set_insn_recog_data, at lra.c:1000 0xd1f5f1 lra_set_insn_recog_data(rtx_insn*) ../../gcc/gcc/lra.c:998 0xd2218f lra_get_insn_recog_data ../../gcc/gcc/lra-int.h:488 0xd2218f remove_scratches_1 ../../gcc/gcc/lra.c:2058 0xd22247 lra_emit_move(rtx_def*, rtx_def*) ../../gcc/gcc/lra.c:503 0xd399bb curr_insn_transform ../../gcc/gcc/lra-constraints.c:4434 0xd3b20d lra_constraints(bool) ../../gcc/gcc/lra-constraints.c:5025 0xd227d4 lra(_IO_FILE*) ../../gcc/gcc/lra.c:2437 0xcd20c9 do_reload ../../gcc/gcc/ira.c:5523 0xcd20c9 execute ../../gcc/gcc/ira.c:5709 Vlad, maybe you have some hint where to look?
Indeed, this seems to be related to LRA. I just tried to build gcc-9 with LRA enabled by default and the build fails when trying to build gnat with: checking for shl_load in -ldld... s-gearop.adb: In function 'Ada.Numerics.Complex_Arrays.Back_Substitute.Sub_Row': s-gearop.adb:124:11: error: insn does not satisfy its constraints: (insn 463 462 465 5 (parallel [ (set (reg:SF 65 fr1 [343]) (reg:SF 0 r0 [344])) (use (reg:SI 154 fpscr0)) (clobber (scratch:SI)) ]) "a-ngcoty.adb":68:10 214 {movsf_ie} (expr_list:REG_DEAD (reg:SF 0 r0 [344]) (nil))) +===========================GNAT BUG DETECTED==============================+ | 9.2.1 20191130 (sh4-linux-gnu) in extract_constrain_insn, at recog.c:2211| | Error detected around s-gearop.adb:124:11 | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb).
GCC 9.3.0 has been released, adjusting target milestone.
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
GCC 9 branch is being closed
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
GCC 10 branch is being closed.
Dup of bug 83464. *** This bug has been marked as a duplicate of bug 83464 ***
(In reply to Andrew Pinski from comment #19) > Dup of bug 83464. > > *** This bug has been marked as a duplicate of bug 83464 *** I don't think this is a duplicate. This one is supposed to be without -mlra.
(In reply to John Paul Adrian Glaubitz from comment #20) > I don't think this is a duplicate. This one is supposed to be without -mlra. All of the comments here talk about -mlra and even that one all of the comments talk about using -mlra .
(In reply to Andrew Pinski from comment #21) > (In reply to John Paul Adrian Glaubitz from comment #20) > > I don't think this is a duplicate. This one is supposed to be without -mlra. > > All of the comments here talk about -mlra and even that one all of the > comments talk about using -mlra . I should probably recheck all the issues I reported whether they still affect gcc-13 or trunk. Some of my reports are quite old.