https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83464
Bug ID: 83464 Summary: [SH] ICE: in final_scan_insn, at final.c:3025 with -mlra Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: glaubitz at physik dot fu-berlin.de CC: glaubitz at physik dot fu-berlin.de, jrtc27 at jrtc27 dot com, olegendo at gcc dot gnu.org Target Milestone: --- Target: sh*-*-* Created attachment 42900 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42900&action=edit C++ source code which triggers the problem While trying to build qtwebkit-opensource-src_5.212.0~alpha2 on Debian unstable sh, I ran into the following ICE with gcc-7.2.0 (SVN 20171216 (r255739)) when building with -mlra: /usr/bin/c++ -DBUILDING_QT__=1 -DBUILDING_WITH_CMAKE=1 -DBUILDING_WebCore -DHAVE_CONFIG_H=1 -DJS_NO_EXPORT -DQT_ASCII_CAST_WARNINGS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DYNAMIC_CAST -DQT_NO_EXCEPTIONS -DQT_SENSORS_LIB -DQT_USE_QSTRINGBUILDER -ISource/WebCore -I../Source/WebCore -I../Source/WebCore/Modules/airplay -I../Source/WebCore/Modules/battery -I../Source/WebCore/Modules/encryptedmedia -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/indieui -I../Source/WebCore/Modules/mediacontrols -I../Source/WebCore/Modules/mediasession -I../Source/WebCore/Modules/mediasource -I../Source/WebCore/Modules/mediastream -I../Source/WebCore/Modules/navigatorcontentutils -I../Source/WebCore/Modules/notifications -I../Source/WebCore/Modules/plugins -I../Source/WebCore/Modules/proximity -I../Source/WebCore/Modules/quota -I../Source/WebCore/Modules/speech -I../Source/WebCore/Modules/streams -I../Source/WebCore/Modules/vibration -I../Source/WebCore/Modules/webaudio -I../Source/WebCore/Modules/webdatabase -I../Source/WebCore/Modules/websockets -I../Source/WebCore/accessibility -I../Source/WebCore/bindings -I../Source/WebCore/bindings/generic -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/cssjit -I../Source/WebCore/dom -I../Source/WebCore/dom/default -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/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/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/harfbuzz -I../Source/WebCore/platform/graphics/harfbuzz/ng -I../Source/WebCore/platform/graphics/opentype -I../Source/WebCore/platform/graphics/transforms -I../Source/WebCore/platform/mediastream -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/text/icu -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/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/xml -I../Source/WebCore/xml/parser -IDerivedSources -IDerivedSources/ForwardingHeaders -IDerivedSources/WebCore -I../Source -I. -I../Source/WebCore/Modules/gamepad/deprecated -I../Source/WebCore/platform/graphics/gpu -I../Source/ThirdParty/woff2/src -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/png -I../Source/WebCore/platform/image-decoders/webp -I../Source/WebCore/platform/linux -I../Source/WebCore/platform/graphics/texmap -I../Source/WebCore/page/scrolling/coordinatedgraphics -I../Source/WebCore/platform/graphics/texmap/coordinated -IDerivedSources/JavaScriptCore -IDerivedSources/JavaScriptCore/inspector -I../Source/JavaScriptCore -I../Source/JavaScriptCore/ForwardingHeaders -I../Source/JavaScriptCore/API -I../Source/JavaScriptCore/assembler -I../Source/JavaScriptCore/bytecode -I../Source/JavaScriptCore/bytecompiler -I../Source/JavaScriptCore/dfg -I../Source/JavaScriptCore/disassembler -I../Source/JavaScriptCore/heap -I../Source/JavaScriptCore/debugger -I../Source/JavaScriptCore/interpreter -I../Source/JavaScriptCore/jit -I../Source/JavaScriptCore/llint -I../Source/JavaScriptCore/parser -I../Source/JavaScriptCore/profiler -I../Source/JavaScriptCore/runtime -I../Source/JavaScriptCore/yarr -I../Source/ThirdParty/ANGLE -I../Source/ThirdParty/ANGLE/include/KHR -I../Source/WebCore/Modules/gamepad -I../Source/WebCore/bridge/qt -I../Source/WebCore/dom/qt -I../Source/WebCore/editing/qt -I../Source/WebCore/history/qt -I../Source/WebCore/page/qt -I../Source/WebCore/platform/qt -I../Source/WebCore/platform/audio/qt -I../Source/WebCore/platform/graphics/egl -I../Source/WebCore/platform/graphics/glx -I../Source/WebCore/platform/graphics/gpu/qt -I../Source/WebCore/platform/graphics/opengl -I../Source/WebCore/platform/graphics/surfaces -I../Source/WebCore/platform/graphics/surfaces/qt -I../Source/WebCore/platform/graphics/qt -I../Source/WebCore/platform/graphics/win -I../Source/WebCore/platform/network/qt -I../Source/WebCore/platform/text/qt -I../Source/WebCore/platform/win -I../Source/WebCore/platform/graphics/x11 -I../Source/WTF -I../Source/WebCore/platform/mediastream/openwebrtc -I../Source/WebCore/platform/graphics/gstreamer -I../Source/WebCore/platform/audio/gstreamer -isystem /usr/include/libxml2 -isystem /usr/include/sh4-linux-gnu/qt5 -isystem /usr/include/sh4-linux-gnu/qt5/QtGui -isystem /usr/include/sh4-linux-gnu/qt5/QtCore -isystem /usr/lib/sh4-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/sh4-linux-gnu/qt5/QtGui/5.9.2 -isystem /usr/include/sh4-linux-gnu/qt5/QtGui/5.9.2/QtGui -isystem /usr/include/sh4-linux-gnu/qt5/QtCore/5.9.2 -isystem /usr/include/sh4-linux-gnu/qt5/QtCore/5.9.2/QtCore -isystem /usr/include/sh4-linux-gnu/qt5/QtNetwork -isystem /usr/include/sh4-linux-gnu/qt5/QtSensors -isystem /usr/include/glib-2.0 -isystem /usr/lib/sh4-linux-gnu/glib-2.0/include -isystem /usr/include/gstreamer-1.0 -I../Source/WebCore/testing -fvisibility=hidden -fvisibility-inlines-hidden -O2 -fdebug-prefix-map=/build/qtwebkit-opensource-src-vhvcwf/qtwebkit-opensource-src-5.212.0~alpha2=. -fstack-protector-strong -Wformat -Werror=format-security -mlra -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -std=c++11 -Wno-expansion-to-defined -Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings -fPIC -fPIC -std=gnu++11 -MD -MT Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/qt/GraphicsContext3DQt.cpp.o -MF Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/qt/GraphicsContext3DQt.cpp.o.d -o Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/qt/GraphicsContext3DQt.cpp.o -c ../Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp --save-temps In file included from ../Source/WTF/wtf/text/WTFString.h:29:0, from ../Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:31, from ../Source/WebCore/platform/graphics/GraphicsContext3D.h:29, from ../Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:20: ../Source/WTF/wtf/text/StringImpl.h: In instantiation of ‘T* WTF::StringImpl::tailPointer() [with T = short unsigned int]’: ../Source/WTF/wtf/text/StringImpl.h:211:39: required from here ../Source/WTF/wtf/text/StringImpl.h:823:16: warning: cast from ‘uint8_t* {aka unsigned char*}’ to ‘short unsigned int*’ increases required alignment of target type [-Wcast-align] return reinterpret_cast_ptr<T*>(reinterpret_cast<uint8_t*>(this) + tailOffset<T>()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../Source/WTF/wtf/text/StringImpl.h: In instantiation of ‘const T* WTF::StringImpl::tailPointer() const [with T = WTF::SymbolRegistry*]’: ../Source/WTF/wtf/text/StringImpl.h:763:47: required from here ../Source/WTF/wtf/text/StringImpl.h:817:16: warning: cast from ‘const uint8_t* {aka const unsigned char*}’ to ‘WTF::SymbolRegistry* const*’ increases required alignment of target type [-Wcast-align] return reinterpret_cast_ptr<const T*>(reinterpret_cast<const uint8_t*>(this) + tailOffset<T>()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../Source/WTF/wtf/text/StringImpl.h: In instantiation of ‘T* WTF::StringImpl::tailPointer() [with T = WTF::SymbolRegistry*]’: ../Source/WTF/wtf/text/StringImpl.h:769:47: required from here ../Source/WTF/wtf/text/StringImpl.h:823:16: warning: cast from ‘uint8_t* {aka unsigned char*}’ to ‘WTF::SymbolRegistry**’ increases required alignment of target type [-Wcast-align] return reinterpret_cast_ptr<T*>(reinterpret_cast<uint8_t*>(this) + tailOffset<T>()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../Source/WTF/wtf/text/StringImpl.h: In instantiation of ‘const T* WTF::StringImpl::tailPointer() const [with T = short unsigned int]’: ../Source/WTF/wtf/text/StringImpl.h:794:47: required from here ../Source/WTF/wtf/text/StringImpl.h:817:16: warning: cast from ‘const uint8_t* {aka const unsigned char*}’ to ‘const short unsigned int*’ increases required alignment of target type [-Wcast-align] return reinterpret_cast_ptr<const T*>(reinterpret_cast<const uint8_t*>(this) + tailOffset<T>()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../Source/WTF/wtf/text/StringImpl.h: In instantiation of ‘const T* WTF::StringImpl::tailPointer() const [with T = WTF::StringImpl*]’: ../Source/WTF/wtf/text/StringImpl.h:830:42: required from here ../Source/WTF/wtf/text/StringImpl.h:817:16: warning: cast from ‘const uint8_t* {aka const unsigned char*}’ to ‘WTF::StringImpl* const*’ increases required alignment of target type [-Wcast-align] ../Source/WTF/wtf/text/StringImpl.h: In instantiation of ‘T* WTF::StringImpl::tailPointer() [with T = WTF::StringImpl*]’: ../Source/WTF/wtf/text/StringImpl.h:837:42: required from here ../Source/WTF/wtf/text/StringImpl.h:823:16: warning: cast from ‘uint8_t* {aka unsigned char*}’ to ‘WTF::StringImpl**’ increases required alignment of target type [-Wcast-align] return reinterpret_cast_ptr<T*>(reinterpret_cast<uint8_t*>(this) + tailOffset<T>()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../Source/WTF/wtf/text/WTFString.h:28:0, from ../Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:31, from ../Source/WebCore/platform/graphics/GraphicsContext3D.h:29, from ../Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:20: ../Source/WTF/wtf/text/ASCIIFastPath.h: In instantiation of ‘bool WTF::charactersAreAllASCII(const CharacterType*, size_t) [with CharacterType = unsigned char; size_t = unsigned int]’: ../Source/WTF/wtf/text/WTFString.h:629:69: required from here ../Source/WTF/wtf/text/ASCIIFastPath.h:96:26: warning: cast from ‘const unsigned char*’ to ‘const MachineWord* {aka const unsigned int*}’ increases required alignment of target type [-Wcast-align] allCharBits |= *(reinterpret_cast_ptr<const MachineWord*>(characters)); ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../Source/WTF/wtf/text/ASCIIFastPath.h: In instantiation of ‘bool WTF::charactersAreAllASCII(const CharacterType*, size_t) [with CharacterType = short unsigned int; size_t = unsigned int]’: ../Source/WTF/wtf/text/WTFString.h:631:66: required from here ../Source/WTF/wtf/text/ASCIIFastPath.h:96:26: warning: cast from ‘const short unsigned int*’ to ‘const MachineWord* {aka const unsigned int*}’ increases required alignment of target type [-Wcast-align] In file included from ../Source/WebCore/platform/graphics/FontDescription.h:34:0, from ../Source/WebCore/platform/graphics/qt/FontPlatformData.h:27, from ../Source/WebCore/platform/graphics/FontPlatformData.h:29, from ../Source/WebCore/platform/graphics/Font.h:30, from ../Source/WebCore/platform/graphics/FontCascade.h:29, from ../Source/WebCore/platform/graphics/GraphicsContext.h:32, from ../Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:23: ../Source/WTF/wtf/RefCountedArray.h: In instantiation of ‘T* WTF::RefCountedArray<T>::Header::payload() [with T = WTF::AtomicString]’: ../Source/WTF/wtf/RefCountedArray.h:68:16: required from ‘WTF::RefCountedArray<T>::RefCountedArray(size_t) [with T = WTF::AtomicString; size_t = unsigned int]’ ../Source/WebCore/platform/graphics/FontDescription.h:267:50: required from here ../Source/WTF/wtf/RefCountedArray.h:190:20: warning: cast from ‘char*’ to ‘WTF::AtomicString*’ increases required alignment of target type [-Wcast-align] return reinterpret_cast_ptr<T*>(result); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../Source/WTF/wtf/RefCountedArray.h: In instantiation of ‘static WTF::RefCountedArray<T>::Header* WTF::RefCountedArray<T>::Header::fromPayload(T*) [with T = WTF::AtomicString]’: ../Source/WTF/wtf/RefCountedArray.h:69:28: required from ‘WTF::RefCountedArray<T>::RefCountedArray(size_t) [with T = WTF::AtomicString; size_t = unsigned int]’ ../Source/WebCore/platform/graphics/FontDescription.h:267:50: required from here ../Source/WTF/wtf/RefCountedArray.h:195:20: warning: cast from ‘char*’ to ‘WTF::RefCountedArray<WTF::AtomicString>::Header*’ increases required alignment of target type [-Wcast-align] return reinterpret_cast_ptr<Header*>(reinterpret_cast<char*>(payload) - size()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp: In member function ‘bool WebCore::GraphicsContext3D::ImageExtractor::extractImage(bool, bool)’: ../Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:568:1: error: could not split insn } ^ (insn 492 253 166 (parallel [ (set (reg:SF 65 fr1 [323]) (reg:SF 67 fr3 [orig:276 D.372971 ] [276])) (use (reg:SI 154 fpscr0)) (clobber (reg:SF 150 fpul [324])) (const_int 0 [0]) ]) "../Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp":559 215 {movsf_ie_ra} (expr_list:REG_DEAD (reg:SF 67 fr3 [orig:276 D.372971 ] [276]) (expr_list:REG_UNUSED (reg:SF 150 fpul [324]) (nil)))) ../Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:568:1: internal compiler error: in final_scan_insn, at final.c:3025 mmap: Permission denied Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions. Attaching the source as well the saved temps.