Bug 9067 - vectors of vectors break with -ftrapv
Summary: vectors of vectors break with -ftrapv
Status: RESOLVED DUPLICATE of bug 1823
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-27 08:26 UTC by 169862
Modified: 2003-07-06 17:27 UTC (History)
2 users (show)

See Also:
Host: i386-linux
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 169862 2002-12-27 08:26:00 UTC
[ Reported to the Debian BTS as report #169862.
  Please CC 169862@bugs.debian.org on replies.
  Log of report can be found at http://bugs.debian.org/169862 ]
	

rechecked with 3.2 branch 20021220 and 3.3 branch 20021227

Not sure if this is a problem with the CPU, the kernel, the compiler,  
or the library. But this seems the most likely candidate. Consider the sample  
program below. When compiled as 
 
g++ foo.cc -ftrapv -o foo
 
and run, the resultant binary immediately aborts. 

#include <vector> 
 
using namespace std; 
 
typedef vector<int> foo_t; 
 
int main() { 
  vector<foo_t> V(10, foo_t()); 
  return 0; 
}

Release:
3.2.1 (Debian) (Debian unstable)

Environment:
System: Debian GNU/Linux (unstable)
Architecture: i686

host: i386-linux
configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=$\(prefix\)/share/man --infodir=$\(prefix\)/share/info --with-gxx-include-dir=$\(prefix\)/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux
Comment 1 Paolo Carlini 2002-12-27 08:49:32 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed. Seems related to libstdc++/1823, which I can also
    reproduce with gcc3.2.1 (glibc2.3.1, i686-pc-linux-gnu)
Comment 2 Falk Hueffner 2003-07-06 17:27:44 UTC

*** This bug has been marked as a duplicate of 1823 ***