This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/10954] New: g++ gives segmentation fault
- From: "geo_2677 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2003 14:16:16 -0000
- Subject: [Bug c++/10954] New: g++ gives segmentation fault
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10954
Summary: g++ gives segmentation fault
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: geo_2677@yahoo.com
CC: gcc-bugs@gcc.gnu.org
GCC host triplet: i686
GCC target triplet: i686
How reproducible:
Always
Steps to Reproduce:
1. Create the following erroneus Test.cpp file
-------------------------------
#include <iostream>
#define TEST ('c'=='a')
enum TEST {tes1=0,test2};
int main()
{
}
---------------------------------
2.Compile with g++
Actual results:
Segmentation fault
Expected results:
Should give parse error
Additional info:
gcc does not give such an error. It reports parse error as expected
The information emitted by the comilper is as shown below
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
/usr/lib/gcc-lib/i386-redhat-linux/3.2/cpp0 -lang-c++ -D__GNUG__=3
-D__DEPRECATED -D__EXCEPTIONS -v -I . -D__GNUC__=3 -D__GNUC_MINOR__=2
-D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__
-Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux
-Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386
-Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ Test.cpp Test.ii
GNU CPP version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
.
/usr/include/c++/3.2
/usr/include/c++/3.2/i386-redhat-linux
/usr/include/c++/3.2/backward
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-linux/3.2/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i386-redhat-linux/3.2/cc1plus -fpreprocessed Test.ii -quiet
-dumpbase Test.cpp -g -version -o Test.s
GNU CPP version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) (i386-redhat-linux)
compiled by GNU C version 3.2 20020903 (Red Hat Linux 8.0 3.2-7).
Test.cpp:4: internal error: Segmentation fault
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.