This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/682: Seg Fault in GNU C++ 2.96 compilation
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/682: Seg Fault in GNU C++ 2.96 compilation
- From: jsvitak at yahoo dot com
- Date: 24 Oct 2000 09:23:48 -0000
- Reply-To: jsvitak at yahoo dot com
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, jason at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, jsvitak@yahoo.com
>Number: 682
>Category: c++
>Synopsis: Seg Fault in GNU C++ 2.96 compilation
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 24 02:26:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Josef Svitak
>Release: gcc version 2.96 20000731 (Red Hat Linux 7.0)
>Organization:
>Environment:
GNU C++ version 2.96 20000731 (Red Hat Linux 7.0)
(i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.0)
>Description:
Seg fault when compiling very small file attached below.
It does catch the error in the code, but then dumps.
Here is the result of:
> g++ -v -save-temps bug.cc
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
/usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c++ -D__GNUG__=2 -v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386__ bug.cc bug.ii
GNU CPP version 2.96 20000731 (Red Hat Linux 7.0) (cpplib)
(i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/g++-3
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-linux/2.96/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1plus bug.ii -quiet -dumpbase bug.cc -version -o bug.s
GNU C++ version 2.96 20000731 (Red Hat Linux 7.0) (i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.0).
bug.cc:8: no `void goo::gummy ()' member function declared in class
`goo'
bug.cc: In method `void goo::gummy ()':
bug.cc:9: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>How-To-Repeat:
g++ -v -save-temps bug.cc
bug.cc:
class goo
{
private:
int i;
};
void goo::gummy()
{
i = 1;
}
>Fix:
Don't write stupid code.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.cc"
Y2xhc3MgZ29vCnsKICBwcml2YXRlOgogICAgY2hhciBjOwp9OwoKdm9pZCBnb286Omd1bW15KCkK
ewogIGludCBpID0gMTsKICBjID0gJ3InOwp9Cg==