Having a directory name, a -c and -o on the command line causes an ICE and a seg fault. The actual code does not seem to matter. Reproduction instructions and actual output follow:
cheinan/test> cat null.cpp int main() { return 0; } cheinan/test> g++ /home/cheinan/test -c null.cpp -o MakeMeICE.o g++: /home/cheinan/test: linker input file unused because linking not done cc1plus: /home/cheinan/test: No such file or directory cc1plus: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. cheinan/test> gcc -v Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/specs Configured with: ../gcc-3.4.3/configure --prefix=/usr/local --enable-threads=posix --enable-languages=c,c++ --disable-nls --enable-__cxa_atexit --enable-shared --program-suffix=3.4.3 Thread model: posix gcc version 3.4.3 cheinan/test> Workaround: Fix make file so invalid compiler command lines are not produced. -- Summary: ICE on invalid command line Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: cheinan at atg dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21864