testcase.cpp: internal compiler error: Segmentation fault.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qt4-x11 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'm using qt4-x11 version 4.4.3-0ubuntu1.2 from intrepid-proposed. I was trying to compile KMess when I noticed an internal compiler error on using QMaps. I read in the gcc FAQ that these are usually because of errors in any of the code it is trying to compile or link, therefore I am reporting here. Please tell me if I should bugreport against gcc instead.
I wrote a test case which I have attached. The gcc-testcase.pro file was simply generated by qmake -project. Compiling this project gives the following output:
$ make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/
testcase.cpp:6: warning: unused parameter 'argc'
testcase.cpp:6: warning: unused parameter 'argv'
testcase.cpp: In member function 'bool QBasicAtomicInt
testcase.cpp:18: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:/
make: *** [testcase.o] Error 1
FWIW, this is the version table and policy of some of my packages:
ii libqtcore4 4.4.3-0ubuntu1.2 Qt 4 core module
ii gcc-4.3 4.3.2-1ubuntu12 The GNU C compiler
ii binutils 2.18.93.
libqtcore4:
Installed: 4.4.3-0ubuntu1.2
Candidate: 4.4.3-0ubuntu1.2
Version table:
*** 4.4.3-0ubuntu1.2 0
500 http://
100 /var/lib/
4.
500 http://
4.4.3-0ubuntu1 0
500 http://
gcc-4.3:
Installed: 4.3.2-1ubuntu12
Candidate: 4.3.2-1ubuntu12
Version table:
*** 4.3.2-1ubuntu12 0
500 http://
100 /var/lib/
4.
500 http://
binutils:
Installed: 2.18.93.
Candidate: 2.18.93.
Version table:
*** 2.18.93.
500 http://
100 /var/lib/
Also:
lrwxrwxrwx 1 root root 7 Nov 8 22:13 /usr/bin/gcc -> gcc-4.3
Seems to work with Qt 4.5.1 and GCC 4.4:
(I did have to add #include <iostream.h> before it'd compile, but it didn't segfault there either)
jonathan@ jonathan- desktop: ~/Documents/ sauce/testcase$ make share/qt4/ mkspecs/ linux-g+ + -I. -I/usr/ include/ qt4/QtCore -I/usr/ include/ qt4/QtGui -I/usr/include/qt4 -I. -I. -o testcase.o testcase.cpp qt4/QtCore/ qmap.h: In function ‘int main(int, char**)’: qt4/QtCore/ qmap.h: 704: warning: dereferencing pointer ‘pretmp.136’ does break strict-aliasing rules jonathan- desktop: ~/Documents/ sauce/testcase$
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/
testcase.cpp:7: warning: unused parameter ‘argc’
testcase.cpp:7: warning: unused parameter ‘argv’
/usr/include/
/usr/include/
cc1plus: note: initialized from here
g++ -Wl,-O1 -o testcase\ testcase testcase.o -L/usr/lib -lQtGui -lQtCore -lpthread
jonathan@