[Bug libstdc++/87784] New: A bug in tr2::dynamic_bitset::find_first

yusemru at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 29 08:19:00 GMT 2018


            Bug ID: 87784
           Summary: A bug in tr2::dynamic_bitset::find_first
           Product: gcc
           Version: 8.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yusemru at gmail dot com
  Target Milestone: ---

Created attachment 44917
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44917&action=edit
source code

Consider the following code:

#include <iostream>
#include <tr2/dynamic_bitset>

using namespace std;
using namespace tr2;

int main() {
        dynamic_bitset<uint64_t> b;
        dynamic_bitset<uint64_t> a;
        cout << b.find_first() << ' ' << a.find_first() << endl;
    return 0;

On my machine it prints 2 2, which is clearly wrong.
I'm using GCC 8.1.1 on Arch Linux x86-64

More information about the Gcc-bugs mailing list