public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17875] New: valarray copy-ctor completely broken
@ 2004-10-07  0:53 ppluzhnikov at charter dot net
  2004-10-07  0:55 ` [Bug libstdc++/17875] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ppluzhnikov at charter dot net @ 2004-10-07  0:53 UTC (permalink / raw)
  To: gcc-bugs

The test case below fails assert on all versions of g++ from 2.95.3 through 
4.0 (20040919 snapshot), on all platforms.

--- cut ---
#include <valarray>
#include <cassert>

int main()
{
    std::valarray<double> v(1);
    std::valarray<double> r;

    r = v;
    assert(r.size() == 1);
    return 0;
}
--- cut ---

$ /usr/local/gcc-4.0/bin/g++ -g exp2.cpp
$ ./a.out
a.out: exp2.cpp:14: int main(): Assertion `r.size() == 1' failed.

-- 
           Summary: valarray copy-ctor completely broken
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ppluzhnikov at charter dot net
                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=17875


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

end of thread, other threads:[~2004-10-07  1:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07  0:53 [Bug c++/17875] New: valarray copy-ctor completely broken ppluzhnikov at charter dot net
2004-10-07  0:55 ` [Bug libstdc++/17875] " pinskia at gcc dot gnu dot org
2004-10-07  0:56 ` ppluzhnikov at charter dot net
2004-10-07  1:02 ` ppluzhnikov at charter dot net

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).