testcase.cpp: internal compiler error: Segmentation fault.

Bug #328299 reported by Sjors Gielen
6
This bug affects 1 person
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/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o testcase.o testcase.cpp
testcase.cpp:6: warning: unused parameter 'argc'
testcase.cpp:6: warning: unused parameter 'argv'
testcase.cpp: In member function 'bool QBasicAtomicInt::operator!=(int) const':
testcase.cpp:18: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions.
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.20081009-0ubuntu1 The GNU assembler, linker and binary utilities
libqtcore4:
  Installed: 4.4.3-0ubuntu1.2
  Candidate: 4.4.3-0ubuntu1.2
  Version table:
 *** 4.4.3-0ubuntu1.2 0
        500 http://ftp.tiscali.nl intrepid-proposed/main Packages
        100 /var/lib/dpkg/status
     4.4.3-0ubuntu1.1 0
        500 http://ftp.tiscali.nl intrepid-updates/main Packages
     4.4.3-0ubuntu1 0
        500 http://ftp.tiscali.nl intrepid/main Packages
gcc-4.3:
  Installed: 4.3.2-1ubuntu12
  Candidate: 4.3.2-1ubuntu12
  Version table:
 *** 4.3.2-1ubuntu12 0
        500 http://ftp.tiscali.nl intrepid-updates/main Packages
        100 /var/lib/dpkg/status
     4.3.2-1ubuntu11 0
        500 http://ftp.tiscali.nl intrepid/main Packages
binutils:
  Installed: 2.18.93.20081009-0ubuntu1
  Candidate: 2.18.93.20081009-0ubuntu1
  Version table:
 *** 2.18.93.20081009-0ubuntu1 0
        500 http://ftp.tiscali.nl intrepid/main Packages
        100 /var/lib/dpkg/status

Also:
lrwxrwxrwx 1 root root 7 Nov 8 22:13 /usr/bin/gcc -> gcc-4.3

Revision history for this message
Sjors Gielen (sgielen) wrote :
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

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
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/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
testcase.cpp:7: warning: unused parameter ‘argc’
testcase.cpp:7: warning: unused parameter ‘argv’
/usr/include/qt4/QtCore/qmap.h: In function ‘int main(int, char**)’:
/usr/include/qt4/QtCore/qmap.h:704: warning: dereferencing pointer ‘pretmp.136’ does break strict-aliasing rules
cc1plus: note: initialized from here
g++ -Wl,-O1 -o testcase\ testcase testcase.o -L/usr/lib -lQtGui -lQtCore -lpthread
jonathan@jonathan-desktop:~/Documents/sauce/testcase$

Changed in qt4-x11 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.