public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
To: gcc-gnats@gcc.gnu.org
Subject: libstdc++/7491: Problems with valarrays (slices and gslices)
Date: Sun, 04 Aug 2002 15:46:00 -0000	[thread overview]
Message-ID: <200208042243.AAA12881@snake.iap.physik.tu-darmstadt.de> (raw)


>Number:         7491
>Category:       libstdc++
>Synopsis:       Problems with valarrays (slices and gslices)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 04 15:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Peter Schmid
>Release:        3.3 20020804 (experimental)
>Organization:
TU Darmstadt
>Environment:
System: Linux kiste 2.4.18 #8 Sat Mar 9 15:33:15 CET 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-languages=c,c++,f77,objc
>Description:
There are problems with valarrays. The slice and general slice subset
assign operators are missing. The included source code ts.C shows the
problem on the main line regarding slices. There are similar problems
using general slices. Earlier versions of gcc compile ts.C without
a problem.    

#include <valarray>

int main()
{
  using namespace std;
  valarray<int> va(12);
  for (int i=0; i<12; i++) 
    va[i] = i+1;

  valarray<int> vb(va[slice(2,4,0)]);
  va[slice(2,4,3)] += vb;
  va[slice(2,4,3)] -= vb;
  va[slice(2,4,3)] *= vb;
  va[slice(2,4,3)] /= vb;
  va[slice(2,4,3)] %= vb;
  va[slice(2,4,3)] ^= vb;
  va[slice(2,4,3)] &= vb;
  va[slice(2,4,3)] |= vb;
  va[slice(2,4,3)] <<= vb;
  va[slice(2,4,3)] >>= vb;
}

Compiling ts.C
g++ -v -o ts ts.C -W -Wall 
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-languages=c,c++,f77,objc
Thread model: posix
gcc version 3.3 20020804 (experimental)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/cc1plus -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -D_GNU_SOURCE ts.C -D__GNUG__=3 -quiet -dumpbase ts.C -W -Wall -version -o /tmp/ccp5pnrg.s
GNU C++ version 3.3 20020804 (experimental) (i686-pc-linux-gnu)
	compiled by GNU C version 3.3 20020804 (experimental).
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/c++/3.3
 /usr/local/include/c++/3.3/i686-pc-linux-gnu
 /usr/local/include/c++/3.3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/include
 /usr/include
End of search list.
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator+=(const std::valarray<_Tp>&) const [with _Tp 
   = int]':
ts.C:11:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:200: error: `
   _Array_augmented_plus' undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h:200: error: (Each undeclared 
   identifier is reported only once for each function it appears in.)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator-=(const std::valarray<_Tp>&) const [with _Tp 
   = int]':
ts.C:12:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:201: error: `
   _Array_augmented_minus' undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator*=(const std::valarray<_Tp>&) const [with _Tp 
   = int]':
ts.C:13:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:197: error: `
   _Array_augmented_multiplies' undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator/=(const std::valarray<_Tp>&) const [with _Tp 
   = int]':
ts.C:14:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:198: error: `
   _Array_augmented_divides' undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator%=(const std::valarray<_Tp>&) const [with _Tp 
   = int]':
ts.C:15:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:199: error: `
   _Array_augmented_modulus' undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator^=(const std::valarray<_Tp>&) const [with _Tp 
   = int]':
ts.C:16:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:202: error: `_Array_augmented_xor
   ' undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator&=(const std::valarray<_Tp>&) const [with _Tp 
   = int]':
ts.C:17:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:203: error: `_Array_augmented_and
   ' undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator|=(const std::valarray<_Tp>&) const [with _Tp 
   = int]':
ts.C:18:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:204: error: `_Array_augmented_or' 
   undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator<<=(const std::valarray<_Tp>&) const [with 
   _Tp = int]':
ts.C:19:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:205: error: `
   _Array_augmented_shift_left' undeclared (first use this function)
/usr/local/include/c++/3.3/bits/slice_array.h: In member function `void 
   std::slice_array<_Tp>::operator>>=(const std::valarray<_Tp>&) const [with 
   _Tp = int]':
ts.C:20:   instantiated from here
/usr/local/include/c++/3.3/bits/slice_array.h:206: error: `
   _Array_augmented_shift_right' undeclared (first use this function)

>How-To-Repeat:

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-08-04 22:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-04 15:46 Peter Schmid [this message]
2002-08-04 16:10 gdr
2002-08-04 16:16 Gabriel Dos Reis
2002-08-04 19:12 gdr

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=200208042243.AAA12881@snake.iap.physik.tu-darmstadt.de \
    --to=schmid@snake.iap.physik.tu-darmstadt.de \
    --cc=gcc-gnats@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).