public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/11126] New: Error in valarray::operator =
@ 2003-06-08 15:36 lupoderi@tiscali.it
  2003-06-08 15:38 ` [Bug libstdc++/11126] " lupoderi@tiscali.it
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: lupoderi@tiscali.it @ 2003-06-08 15:36 UTC (permalink / raw)
  To: gcc-bugs

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;
}


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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-08 15:36 [Bug libstdc++/11126] New: Error in valarray::operator = lupoderi@tiscali.it
2003-06-08 15:38 ` [Bug libstdc++/11126] " lupoderi@tiscali.it
2003-06-08 16:12 ` gdr@integrable-solutions.net
2003-06-08 16:12 ` [Bug libstdc++/11126] New: " Gabriel Dos Reis
2003-06-09  8:15 ` [Bug libstdc++/11126] " 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

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