🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #256

bad symtab entries for member function pointer

#256
From: Doug Moore
Date: Tue, 14 Apr 1992 06:52
65 lines
2981 bytes
In the following program:
==========================================
class c;
int (c::*f) (int); 

main()
{
}
==========================================
compiled as follows, with g++ 2.1 (Tiemann, Stump patches, sparc2, sunos4.1):
==========================================
c++ -g -v bug.cc
Reading specs from /marsh/comp212/lib/gcc-lib/sun4/2.1/specs
gcc version 2.1
 /marsh/comp212/lib/gcc-lib/sun4/2.1/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -g bug.cc /usr/tmp/cca05680.i
GNU CPP version 2.1 (sparc)
 /marsh/comp212/lib/gcc-lib/sun4/2.1/cc1plus /usr/tmp/cca05680.i -quiet -dumpbase bug.cc -g -version -o /usr/tmp/cca05680.s
GNU C++ version 2.1 (sparc) compiled by GNU C version 2.1.
 as -o bug.o /usr/tmp/cca05680.s
 /marsh/comp212/lib/gcc-lib/sun4/2.1/ld -e start -dc -dp /lib/crt0.o -L/marsh/comp212/lib/gcc-lib/sun4/2.1/ -L/marsh/comp212/lib/ bug.o -lg++ -lm -lgcc -lc -lg -lgcc

Compilation finished at Tue Apr 14 01:47:08
==========================================
gdb 4.5 dies on the following sequence of operations:
==========================================
Current directory is /marsh/comp212/.jnkk/
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.5, Copyright 1992 Free Software Foundation, Inc...
(gdb) break main
Breakpoint 1 at 0x22a8: file bug.cc, line 6.
(gdb) run
Starting program: /marsh/comp212/.jnkk/a.out 

Breakpoint 1, main () at bug.cc:6
(gdb) ptype f

Inferior Gdb segmentation fault
==========================================
I conclude that the fault lies partially in g++ 2.1, because the same problem
does not arise when the program is compiled with the same options by
g++ 1.40.3:
==========================================
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.5, Copyright 1992 Free Software Foundation, Inc...
(gdb) break main
Breakpoint 1 at 0x251c: file bug.cc, line 6.
(gdb) run
Starting program: /marsh/comp212/.jnkk/a.out 

Breakpoint 1, main () at bug.cc:6
(gdb) ptype f
type = (int  struct c::*)(int)
(gdb) c
Continuing.

Program exited normally.
(gdb) 
==========================================

Doug Moore
(dougm@cs.rice.edu)
Technical Details
Message-ID: <9204140652.AA13667@cs.rice.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.rice.edu!dougm

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.rice.edu!dougm
From: dougm@cs.rice.edu (Doug Moore)
Subject: bad symtab entries for member function pointer
Message-ID: <9204140652.AA13667@cs.rice.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 14 Apr 1992 06:52:36 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 66