Ubuntu

Activity log for bug #541733

Date Who What changed Old value New value Message
2010-03-19 08:42:43 Wang Danqi bug added bug
2010-03-19 08:48:26 Wang Danqi description Binary package hint: gcc-4.4 Output of lsb_release -rd Description: Ubuntu 9.10 Release: 9.10 Output of apt-cache policy g++: g++: Installed: 4:4.4.1-1ubuntu2 Candidate: 4:4.4.1-1ubuntu2 Version table: *** 4:4.4.1-1ubuntu2 0 500 http://ftp.science.nus.edu.sg karmic/main Packages 100 /var/lib/dpkg/status Problem description: When I try to compile my c++ code with g++, an "internal compiler error: Segmentation fault" occurs and g++ stops work. The problem can be reproduced with a simple case with three c++ files, foo.cc foo.h and all.h. The content of these files are as follows: all.h #ifndef STDIO_H_ #define STDIO_H_ #include <stdio.h> #endif /* STDIO_H_ */ foo.h #include "all.h" foo.cc #include "foo.h" Steps to produce the problem 1) g++ all.h to generate all.h.gch 2) g++ -c foo.cc Then the following error occurs: c1plus: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions. If I remove all.h.gch and try step 2) again, everything goes fine. In addition, when I change foo.cc to foo.c and use gcc to repeat step 1) and 2), no error occurs. Binary package hint: gcc-4.4 Output of lsb_release -rd  Description: Ubuntu 9.10 Release: 9.10 Output of apt-cache policy g++: g++:   Installed: 4:4.4.1-1ubuntu2   Candidate: 4:4.4.1-1ubuntu2   Version table:  *** 4:4.4.1-1ubuntu2 0         500 http://ftp.science.nus.edu.sg karmic/main Packages         100 /var/lib/dpkg/status Problem description: When I try to compile my c++ code with g++, an "internal compiler error: Segmentation fault" occurs and g++ stops work. The problem can be reproduced with a simple case with three c++ files, foo.cc foo.h and all.h. The content of these files are as follows: all.h #ifndef STDIO_H_ #define STDIO_H_ #include <stdio.h> #endif /* STDIO_H_ */ foo.h #include "all.h" foo.cc #include "foo.h" Steps to produce the problem 1) g++ all.h to generate all.h.gch 2) g++ -c foo.cc Then the following error occurs: c1plus: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions. If I remove all.h.gch and try step 2) again, everything goes fine. If I change foo.h to the following content, then no error occurs. foo.h #include <math.h> #include "all.h" In addition, when I change foo.cc to foo.c and use gcc to repeat step 1) and 2), no error occurs.
2010-04-16 08:15:07 Matthias Klose gcc-4.4 (Ubuntu): importance Undecided Medium
2010-04-16 08:15:07 Matthias Klose gcc-4.4 (Ubuntu): status New Triaged
2010-04-16 08:15:45 Matthias Klose summary g++ encounters "internal compiler error: Segmentation fault" with precompiled header [fixed in 4.5] "ICE: Segmentation fault" with precompiled header