From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3956 invoked by alias); 4 Aug 2002 22:46:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 3934 invoked by uid 71); 4 Aug 2002 22:46:00 -0000 Resent-Date: 4 Aug 2002 22:46:00 -0000 Resent-Message-ID: <20020804224600.3933.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, Peter Schmid Received: (qmail 3096 invoked from network); 4 Aug 2002 22:43:40 -0000 Received: from unknown (HELO snake.iap.physik.tu-darmstadt.de) (130.83.4.87) by sources.redhat.com with SMTP; 4 Aug 2002 22:43:40 -0000 Received: (from schmid@localhost) by snake.iap.physik.tu-darmstadt.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id AAA12881; Mon, 5 Aug 2002 00:43:39 +0200 Message-Id: <200208042243.AAA12881@snake.iap.physik.tu-darmstadt.de> Date: Sun, 04 Aug 2002 15:46:00 -0000 From: Peter Schmid To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: libstdc++/7491: Problems with valarrays (slices and gslices) X-SW-Source: 2002-08/txt/msg00076.txt.bz2 List-Id: >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 int main() { using namespace std; valarray va(12); for (int i=0; i<12; i++) va[i] = i+1; valarray 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: