Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 11473
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Jack Lloyd <lloyd@randombit.net>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 11473 depends on: Show dependency tree
Show dependency graph
Bug 11473 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2003-07-13 00:21 Opened: 2003-07-09 14:17
Including virtually any STL header and attempting to compile with -gstabs with
GCC 3.3 causes an ICE on x86/Linux. I'm using glibc 2.2.5 and binutils
2.11.93.0.2, though I doubt either is relevant here. Using other debug flags,
like -gstabs+, -gdwarf, -gdwarf-2, etc, seems to work fine.

$ cat stabsbug.cpp 
#include <vector>

int main() { return 0; }

$ g++-3.3 -gstabs stabsbug.cpp -c -o /dev/null 
In file included from /usr/local/gcc-3.3/include/c++/3.3/bits/stl_algobase.h:73,
                 from /usr/local/gcc-3.3/include/c++/3.3/vector:67,
                 from stabsbug.cpp:1:
/usr/local/gcc-3.3/include/c++/3.3/bits/stl_iterator_base_types.h:84: 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.
$ g++-3.3 -v
Reading specs from /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/usr/local/gcc-3.3 --enable-threads
Thread model: posix
gcc version 3.3

------- Comment #1 From Andrew Pinski 2003-07-09 14:26 -------
Confirmed on 3.3.1 (20030707) and the mainline (20030708),
Simplified example:
struct t{};
struct g : public t{};

------- Comment #2 From Wolfgang Bangerth 2003-07-09 14:31 -------
Indeed confirmed with Andrew's small testcase. This is a regression w.r.t.
3.2, where it worked.

A backtrace on mainline looks like this:
#0  host_integerp (t=0x0, pos=0) at ../../gcc/gcc/tree.c:3251
#1  0x08600ca0 in ?? ()
#2  0x083b7cb9 in tree_low_cst (t=0x0, pos=0) at ../../gcc/gcc/tree.c:3270
#3  0x081b7750 in dbxout_type (type=0x403d98dc, full=1)
    at ../../gcc/gcc/dbxout.c:1659
#4  0x081b8ef5 in dbxout_symbol (decl=0x403d9a20, local=0)
    at ../../gcc/gcc/dbxout.c:2124
#5  0x083a8635 in rest_of_type_compilation (type=0x403d98dc, toplev=1077778976)
    at ../../gcc/gcc/toplev.c:2406
#6  0x080cf588 in finish_struct_1 (t=0x1) at ../../gcc/gcc/cp/class.c:5213
#7  0x080d0296 in finish_struct (t=0x403d98dc, attributes=0x0)
    at ../../gcc/gcc/cp/class.c:5271
#8  0x0813dd8a in finish_class_definition (t=0x403d98dc, attributes=0x0, 
    semi=1, pop_scope_p=0) at ../../gcc/gcc/cp/semantics.c:2033

So it's really a problem in the debug backends, rather than the C++ front
end (of course).

W.

------- Comment #3 From Jack Lloyd 2003-07-09 14:33 -------
In that case this is probably a dupe of bug 7083, though it's odd, because that
bug was for GCC 3.1, and I didn't run into this with 3.1 or 3.2. Hrm.



------- Comment #4 From Steven Bosscher 2003-07-12 12:20 -------
The problem is apparently in dbxout.c:dbxout_type:

		print_wide_int (tree_low_cst (DECL_SIZE
					      (TYPE_NAME
					       (BINFO_TYPE (child))),
					      0)
				* BITS_PER_UNIT);

But the tree for DECL_SIZE that is passed is NULL.

Is this really target specific?

------- Comment #5 From Dara Hazeghi 2003-07-13 00:21 -------
Not target specific (occurs on powerpc darwin).

------- Comment #6 From Steven Bosscher 2003-07-14 10:51 -------
: Search converges between 2002-09-29-trunk (#91) and 2002-10-02-trunk (#92).

------- Comment #7 From CVS Commits 2003-07-15 16:53 -------
Subject: Bug 11473

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	mmitchel@gcc.gnu.org	2003-07-15 16:53:31

Modified files:
	gcc            : ChangeLog dbxout.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/debug: debug8.C 

Log message:
	PR debug/11473
	* dbxout.c (dbxout_type): Use TYPE_SIZE to determine the sizes of
	base classes.
	
	PR debug/11473
	* g++.dg/debug/debug8.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.661&r2=1.16114.2.662
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dbxout.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.130&r2=1.130.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.234&r2=1.2261.2.235
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/debug/debug8.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1


------- Comment #8 From CVS Commits 2003-07-15 16:56 -------
Subject: Bug 11473

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2003-07-15 16:56:50

Modified files:
	gcc            : ChangeLog dbxout.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/debug: debug8.C 

Log message:
	PR debug/11473
	* dbxout.c (dbxout_type): Use TYPE_SIZE to determine the sizes of
	base classes.
	
	PR debug/11473
	* g++.dg/debug/debug8.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.515&r2=2.516
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dbxout.c.diff?cvsroot=gcc&r1=1.154&r2=1.155
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2880&r2=1.2881
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/debug/debug8.C.diff?cvsroot=gcc&r1=1.1&r2=1.2


------- Comment #9 From Mark Mitchell 2003-07-15 17:00 -------
Fixed in GCC 3.3.1, GCC 3.4.

------- Comment #10 From Mark Mitchell 2003-07-15 17:00 -------
Fixed in GCC 3.3.1, GCC 3.4.

------- Comment #11 From Andrew Pinski 2003-07-25 15:07 -------
*** Bug 11675 has been marked as a duplicate of this bug. ***

------- Comment #12 From Andrew Pinski 2003-10-30 17:31 -------
*** Bug 12844 has been marked as a duplicate of this bug. ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug