This is the mail archive of the gcc-patches@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]

V3 PATCH: Fix PR/8851


This fixes a thinko of mine.

-- Gaby
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/ChangeLog,v
retrieving revision 1.1460
diff -p -r1.1460 ChangeLog
*** ChangeLog	5 Dec 2002 22:53:41 -0000	1.1460
--- ChangeLog	10 Dec 2002 07:30:23 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2002-12-09  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+ 
+ 	* include/bits/slice_array.h (slice_array<>::operator=): Fix typo.
+ 
  2002-12-05  Benjamin Kosnik  <bkoz@redhat.com>
  
  	* testsuite/abi_check.cc: Add GLIBCPP_3.2.2.
Index: include/bits/slice_array.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/slice_array.h,v
retrieving revision 1.10
diff -p -r1.10 slice_array.h
*** include/bits/slice_array.h	5 Aug 2002 02:09:27 -0000	1.10
--- include/bits/slice_array.h	10 Dec 2002 07:30:23 -0000
*************** namespace std
*** 157,163 ****
      inline slice_array<_Tp>&
      slice_array<_Tp>::operator=(const slice_array<_Tp>& __a)
      {
!       __valarray_copy(_M_array, _M_sz, _M_stride, __a._M_array, __a._M_stride);
        return *this;
      }
  
--- 157,164 ----
      inline slice_array<_Tp>&
      slice_array<_Tp>::operator=(const slice_array<_Tp>& __a)
      {
!       __valarray_copy(__a._M_array, __a._M_sz, __a._M_stride,
!                       _M_array, _M_stride);
        return *this;
      }
  
Index: testsuite/26_numerics/slice_array_assignment.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/26_numerics/slice_array_assignment.cc,v
retrieving revision 1.1
diff -p -r1.1 slice_array_assignment.cc
*** testsuite/26_numerics/slice_array_assignment.cc	13 Jun 2001 22:16:24 -0000	1.1
--- testsuite/26_numerics/slice_array_assignment.cc	10 Dec 2002 07:30:23 -0000
***************
*** 1,6 ****
  // 20010613 gdr
  
! // Copyright (C) 2001 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // 20010613 gdr
  
! // Copyright (C) 2001, 2002 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
***************
*** 30,44 ****
  
  // This is DR-253.  Test for accessible assignment-operators.
  #include <valarray>
  
  int main()
  {
!   std::valarray<double> v(10), w(10);
!   std::slice s(0, 0, 0);
  
!   v[s] = w[s];                  // dg-do compile
  
!   std::slice_array<double> t = v[s];
    
    return 0;
  }
--- 30,50 ----
  
  // This is DR-253.  Test for accessible assignment-operators.
  #include <valarray>
+ #include <testsuite_hooks.h>
  
  int main()
  {
!   using std::valarray;
!   using std::slice;
!   valarray<int> v(1, 10), w(2, 10);
  
!   w[slice(0, 3, 3)] = v[slice(2, 3, 3)];
  
!   VERIFY(v[0] == 1 && w[0] == 1);
!   VERIFY(v[3] == 1 && w[3] == 1);
!   VERIFY(v[6] == 1 && w[6] == 1);
! 
!   std::slice_array<int> t = v[slice(0, 10, 1)];
    
    return 0;
  }


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