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

Please close PR libstdc++/1857


Please close PR libstdc++/1857.
Though I am not the originator of the bug report and my system setup is
different than that of the originator, I believe the problem is a
generic library problem (not target specific). 

I made the trivial modifications to the included test case.
PR libstdc++/1857
source code tbit.C
//#include <climits>
//#include <algobase.h>
#include <bitset>
#include <iostream>

using std::bitset;
using std::cout;
using std::endl;
int main() {
    bitset<66> b(1);
    cout << b << endl;
    b<<=32;
    cout << b << endl;
    b |= bitset<66>(1)<<65;
    cout << b << endl;
    b>>=32;
    cout << b << endl;
    return 0;
}

Compiling tbit.C
g++ -v -o tbit tbit.C -W -Wall
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77,objc
Thread model: posix
gcc version 3.0 20010608 (prerelease)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ tbit.C -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase tbit.C -W -Wall -version -o /tmp/ccM0RUgS.s
GNU CPP version 3.0 20010608 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0 20010608 (prerelease) (i686-pc-linux-gnu)
	compiled by GNU C version 3.0 20010608 (prerelease).
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/include
 /usr/local/i686-pc-linux-gnu/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/../../../../i686-pc-linux-gnu/bin/as --traditional-format -V -Qy -o /tmp/ccxgzkfC.o /tmp/ccM0RUgS.s
GNU assembler version 2.11.90.0.4 (i686-pc-linux-gnu) using BFD version 2.11.90.0.4
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o tbit /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/crtbegin.o -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0 -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/../../../../i686-pc-linux-gnu/lib -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/../../.. /tmp/ccxgzkfC.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0/crtend.o /usr/lib/crtn.o

Running the program tbit shows the expected output, as shown in the
original bug report.

./tbit
000000000000000000000000000000000000000000000000000000000000000001
000000000000000000000000000000000100000000000000000000000000000000
100000000000000000000000000000000100000000000000000000000000000000
000000000000000000000000000000001000000000000000000000000000000001

N.B. It makes no difference whether the <climits> and <algobase.h>
header files are included or not.

Since this is the correct output, I ask you for closing the bug report.

Thank you for fixing the problem.

Peter Schmid


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