http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55748
Bug #: 55748 Summary: compile eror when -fprefetch-loop-arrays is added , while everything goes well without the option. Classification: Unclassified Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: chx...@mail.ustc.edu.cn I use gcc-4.4.0 to compile qt-everywhere-opensource-src-4.7.2, and a compiler inner error comes out. the steps of compiling qt: > 1)export CFLAGS="-O3 -pipe -Wall -march=loongson3a -ftree-vectorize > -fprefetch-loop-arrays -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > --param=ssp-buffer-size=4" > 2)export CXXFLAGS="-O3 -pipe -Wall -march=loongson3a -ftree-vectorize > -fprefetch-loop-arrays -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > --param=ssp-buffer-size=4" > 3)./configure > 4)gmake However when I strike out the -fprefetch-loop-arrays option, the compilation goes right. The -fprefetch-loop-arrays option is only related to the ssa optimization pass(struct gimple_opt_pass pass_ssa_prefetch). I made a test. I rewrite the gate function of pass_ssa_prefetch, and let the function do nothing but return 0. The compilation was OK , using the original options. •the version of GCC : gcc-4.4.0 •the system type : mips64-linux •the options given when GCC was configured/built: ../gcc-4.4.0/configure --prefix=/opt/toolchain/ --with-system-zlib \ --enable-threads=posix --enable-shared --enable-long-long \ --enable-disable-libjava-multilib --disable-ssp --disable-libssp \ --with-local-prefix=/opt/toolchain --with-abi=32 --disable-multilib \ --with-binutils=/opt/toolchain \ --enable-languages=c,c++,fortran,objc,obj-c++ \ •the complete command line that triggers the bug: g++ -O3 -Wall -march=loongson3a -ftree-vectorize -fprefetch-loop-arrays -save-temps -fexceptions -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -I/usr/include/freetype2 -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/linux-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -I../3rdparty/xorg -Iimage -I/usr/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/usr/X11R6/include -I.uic/release-shared -o .obj/release-shared/qtoolbararealayout.o widgets/qtoolbararealayout.cpp •the compiler output : widgets/qtoolbararealayout.cpp: In member function ‘QList<int> QToolBarAreaLayout::currentGapIndex() const’: widgets/qtoolbararealayout.cpp:1058: 警告:此函数中的‘k’在使用前未初始化 widgets/qtoolbararealayout.cpp: In member function ‘QList<int> QToolBarAreaLayout::gapIndex(const QPoint&) const’: widgets/qtoolbararealayout.cpp:1029: 编译器内部错误:在 expand_expr_addr_expr_1 中,于 expr.c:6990 请提交一份完整的错误报告, 如有可能请附上经预处理后的源文件。 具体步骤请参见 <http://gcc.gnu.org/bugs.html>。 •the preprocessed file: the file is update as the attachment.