Bug 522577 - qt build fails without -fno-var-tracking-assignments
Summary: qt build fails without -fno-var-tracking-assignments
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 522576
TreeView+ depends on / blocked
 
Reported: 2009-09-10 18:17 UTC by Rex Dieter
Modified: 2009-09-11 18:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-11 18:04:45 UTC


Attachments (Terms of Use)
rh522577.ii.bz2 (210.15 KB, application/x-bzip2)
2009-09-10 19:38 UTC, Jakub Jelinek
no flags Details

Description Rex Dieter 2009-09-10 18:17:40 UTC
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.

Comment 1 Jakub Jelinek 2009-09-10 19:38:29 UTC
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.

Comment 2 Jakub Jelinek 2009-09-10 20:18:09 UTC
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).

Comment 3 Alexandre Oliva 2009-09-11 08:14:55 UTC
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.

Comment 4 Jakub Jelinek 2009-09-11 18:04:45 UTC
Should be fixed in gcc-4.4.1-13.


Note You need to log in before you can comment on or make changes to this bug.