public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lupoderi@tiscali.it" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/11126] New: Error in valarray::operator =
Date: Sun, 08 Jun 2003 15:36:00 -0000	[thread overview]
Message-ID: <20030608153609.11126.lupoderi@tiscali.it> (raw)

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

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

           Summary: Error in valarray::operator =
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: lupoderi@tiscali.it
                CC: gcc-bugs@gcc.gnu.org

The valarrat::operator=() doesn't change the size of right side operand.
For example, the following code fails the assert:

#include <iostream>
#include <valarray>
#include <assert.h>

using namespace std;

int main()
{
  const int kLen = 2;

  valarray<int> v1, v2;
  int i;

  v1.resize(kLen);

  for (i=0; i<kLen; ++i)
	 v1[i] = i;

  v2=v1;

  assert (v2.size() == v1.size());
  for (i=0; i<kLen; ++i)
	 assert (v2[i]==i);


  return 0;
}


             reply	other threads:[~2003-06-08 15:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-08 15:36 lupoderi@tiscali.it [this message]
2003-06-08 15:38 ` [Bug libstdc++/11126] " lupoderi@tiscali.it
2003-06-08 16:12 ` [Bug libstdc++/11126] New: " Gabriel Dos Reis
2003-06-08 16:12 ` [Bug libstdc++/11126] " gdr@integrable-solutions.net
2003-06-09  8:15 ` dhazeghi@yahoo.com
2003-06-09  9:58 ` gdr@integrable-solutions.net
2003-06-09 16:26 ` pme@gcc.gnu.org
2003-06-09 18:57 ` lupoderi@tiscali.it
2004-10-07  1:02 ` ppluzhnikov at charter dot net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030608153609.11126.lupoderi@tiscali.it \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).