public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/12103] New: -g only crash (segfault) with a forward declared class used as a template parameter
@ 2003-08-29 11:34 ritzert at t-online dot de
  2003-08-29 13:18 ` [Bug debug/12103] [3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ritzert at t-online dot de @ 2003-08-29 11:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12103

           Summary: -g only crash (segfault) with a forward declared class
                    used as a template parameter
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ritzert at t-online dot de
                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

The backtrace from cc1plus 
 
#0  0x083d1f3b in host_integerp (t=0x0, pos=0) 
    at /home/ritzert/gcc/HEAD/gcc/gcc/tree.c:3257 
#1  0x083d1fd9 in tree_low_cst (t=0x0, pos=0) 
    at /home/ritzert/gcc/HEAD/gcc/gcc/tree.c:3275 
#2  0x081db313 in add_data_member_location_attribute (die=0x401b0050, 
    decl=0x401a9e40) at /home/ritzert/gcc/HEAD/gcc/gcc/dwarf2out.c:9014 
#3  0x081e1574 in gen_inheritance_die (binfo=0x401a9e40, access=0x0, 
    context_die=0x401b0028) at 
/home/ritzert/gcc/HEAD/gcc/gcc/dwarf2out.c:11191 
 
shows that BINFO_VPTR_FIELD (decl) is 0 in add_data_member_location_attribute. 
 
The stripped down testcase: 
template<class T> 
class foo 
{ 
    T data_; 
}; 
 
class bar; 
typedef foo< bar > foobar; 
 
class obj 
{ 
  virtual foobar* yeah() = 0; 
}; 
 
class bar : virtual public obj 
{ 
}; 
 
gcc version 3.4 20030827 (experimental) 
 
The above code compiles 
- with gcc version 3.3.2 20030812 (Debian prerelease) 
- or without -g


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-02-29 23:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-29 11:34 [Bug debug/12103] New: -g only crash (segfault) with a forward declared class used as a template parameter ritzert at t-online dot de
2003-08-29 13:18 ` [Bug debug/12103] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-11-09  3:16 ` pinskia at gcc dot gnu dot org
2003-12-19  6:36 ` pinskia at gcc dot gnu dot org
2004-01-05  8:47 ` pinskia at gcc dot gnu dot org
2004-01-06  5:29 ` pinskia at gcc dot gnu dot org
2004-01-14  6:40 ` pinskia at gcc dot gnu dot org
2004-01-16  2:36 ` pinskia at gcc dot gnu dot org
2004-02-28  2:29 ` [Bug debug/12103] [3.4/3.5 " mmitchel at gcc dot gnu dot org
2004-02-29 23:04 ` cvs-commit at gcc dot gnu dot org
2004-02-29 23:10 ` cvs-commit at gcc dot gnu dot org
2004-02-29 23:17 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).