This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16205] New: 3.5: ICE with -Wall on no-throw specifier



g++ segfaults on the example below if -Wall is used:

$ ./cc1plus -quiet -Wall x.cc
x.cc: In function `void t_test1(C*)':
x.cc:8: 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.
$

Here's where it's crashing:

Program received signal SIGSEGV, Segmentation fault.
0x0815480b in warn_for_collisions_1 (written=0x400f5cb0, writer=0x40008240,
    list=0x86927b0, only_writes=0) at /home/sss/gcc/gcc/gcc/c-common.c:1344
1344                       IDENTIFIER_POINTER (DECL_NAME (list->expr)));


(gdb) where
#0  0x0815480b in warn_for_collisions_1 (written=0x400f5cb0,
    writer=0x40008240, list=0x86927b0, only_writes=0)
    at /home/sss/gcc/gcc/gcc/c-common.c:1344
#1  0x081548b0 in warn_for_collisions (list=0x8692918)
    at /home/sss/gcc/gcc/gcc/c-common.c:1361
#2  0x08155641 in verify_sequence_points (expr=0x40083604)
    at /home/sss/gcc/gcc/gcc/c-common.c:1606
#3  0x0812224f in finish_expr_stmt (expr=0x40083604)
    at /home/sss/gcc/gcc/gcc/cp/semantics.c:497
...

It looks like this is more fallout from Richard's recent changes.

Environment:
System: Linux karma 2.6.7 #16 Tue Jun 22 21:52:28 EDT 2004 i686 i686 i386 GNU/Linux
Architecture: i686

	<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/sss/gcc/gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f95

How-To-Repeat:

Compile with -Wall:

----------------------------------
struct C
{
  ~C() throw();
};

void t_test1 (C* mapping)
{
  delete [] mapping;
}
----------------------------------
------- Additional Comments From snyder at fnal dot gov  2004-06-25 19:30 -------
Fix:
	<how to correct or work around the problem, if known (multiple lines)>

-- 
           Summary: 3.5: ICE with -Wall on no-throw specifier
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: snyder at fnal dot gov
                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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]