https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68519
Bug ID: 68519 Summary: condition_variable::wait_for does not work properly with float duration Product: gcc Version: 5.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: jbellon at bsc dot es Target Milestone: --- Created attachment 36823 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36823&action=edit preprocessed source file that reproduces the bug If std::chrono::duration<float> is used as timeout datatype for std::condition_variable::wait_for, then the thread, apparently, does not become blocked. Correct result is got by changing timeout type to std::chrono::duration<double>. Expected output: {{{ Do something... Do something... Do something... Do something... Exit... }}} G++ version and configuration: Usando especificaciones internas. COLLECT_GCC=/bin/g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/lto-wrapper Objetivo: x86_64-redhat-linux Configurado con: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-default-libstdcxx-abi=c++98 --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Modelo de hilos: posix gcc versión 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC) Note: installed in Fedora 22 using official repositories.