[Bug libstdc++/14254] New: Problems with masked valarrays

schmid at snake dot iap dot physik dot tu-darmstadt dot de gcc-bugzilla@gcc.gnu.org
Mon Feb 23 07:28:00 GMT 2004


The masking facility of valarrays does no longer work. gcc 3.3 and earlier
versions of gcc 3.4 have no problems compiling the appended code tmv.C.

Source code tmv.C

#include <valarray>

using namespace std;

int main()
{

    valarray<double> va(5);

    for (int i=0; i<5; i++) 
	va[i] = i;
    
    va[va>2.0 && va<5.0]
        = valarray<double>(va[va>2.0 && va<5.0]) + 42.0;
}
g++ -v -W -Wall tmv.C -save-temps
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../gcc/configure --enable-threads=posix
--enable-languages=c,c++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.0 20040221 (prerelease)
 /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -E -quiet -v
-D_GNU_SOURCE tmv.C -mtune=pentiumpro -W -Wall -o tmv.ii
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory
"/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/i686-pc-linux-gnu
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/backward
 /usr/local/include
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include
 /usr/include
End of search list.
 /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -fpreprocessed tmv.ii
-quiet -dumpbase tmv.C -mtune=pentiumpro -auxbase tmv -W -Wall -version -o tmv.s
GNU C++ version 3.4.0 20040221 (prerelease) (i686-pc-linux-gnu)
	compiled by GNU C version 3.4.0 20040221 (prerelease).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64274
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/bits/mask_array.h:
In function `int main()':
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/bits/mask_array.h:133:
error: `std::mask_array<_Tp>::mask_array(const std::mask_array<_Tp>&) [with _Tp
= double]' is private
tmv.C:14: error: within this context

Compilation exited abnormally with code 1 at Sun Feb 22 23:45:19

Preprocessed no included because of space limitations.

-- 
           Summary: Problems with masked valarrays
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schmid at snake dot iap dot physik dot tu-darmstadt dot
                    de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



More information about the Gcc-bugs mailing list