qt builds recently started failing, e.g. https://koji.fedoraproject.org/koji/taskinfo?taskID=1663434 ppc64 fell over first (not sure if other archs are affected). g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mminimal-toc -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_SVG_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include/QtCore -I../../include/QtGui -I../../include -I../../include/QtSvg -I.rcc/release-shared -I../3rdparty/harfbuzz/src -I.moc/release-shared -o .obj/release-shared/moc_qsvgwidget.o .moc/release-shared/moc_qsvgwidget.cpp qsvghandler.cpp: In function 'bool parsePathDataFast(const QStringRef&, QPainterPath&)': qsvghandler.cpp:1659: internal compiler error: in simplify_const_unary_operation, at simplify-rtx.c:1208 subsequent builds using -fno-var-tracking-assignments succeeded.
Created attachment 360561 [details] rh522577.ii.bz2 Reproduceable even with x86_64-linux -> powerpc64-linux cross: ./cc1plus -m64 -g -O2 rh522577.ii -quiet qsvghandler.cpp: In function ‘bool parsePathDataFast(const QStringRef&, QPainterPath&)’: qsvghandler.cpp:1659: internal compiler error: in simplify_const_unary_operation, at simplify-rtx.c:1208 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
simplify_rtx is called on: (zero_extend:DI (const_int 1 [0x1])) expand_debug_expr creates: (zero_extend:DI (subreg:SI (reg/v:DI 314 [ l+-4 ]) 4)) then propagate_for_debug -> propagate_for_debug_subst replaces the subreg with (const_int 1), but as it doesn't know it is inside of ZERO_EXTEND that can't be applied to a VOIDmode constant, it creates invalid rtx. DEBUG_INSNs don't have any kind of validation, so we end up with this. I wonder if we shouldn't when replacing something non-VOIDmode with VOIDmode constant in propagate_for_debug_subst wrap it using wrap_constant and perhaps if we find out we've changed something try to simplify it (but that as an optimization only).
We already deal with SUBREGs in propagate_for_debug_subst, we might as well deal with ZERO_EXTEND and other unary expressions as well. Wrapping ought to work as well.
Should be fixed in gcc-4.4.1-13.