Hi

While working on hashtable I have added this kind of expression to decide to cache or not hash code:

  template<class _Value,
           class _Hash = hash<_Value>,
           class _Pred = std::equal_to<_Value>,
           class _Alloc = std::allocator<_Value>,
           bool __cache_hash_code =
             __not_<__and_<is_integral<_Value>,
                           integral_constant<bool,
noexcept(declval<const _Hash&>()(declval<const _Value&>()))>>
>::value>
    class __unordered_set

    In normal mode it works fine however in debug mode it generates an ICE:

Executing on host: /home/fdt/dev/gcc-trunk-build/./gcc/g++ -shared-libgcc -B/home/fdt/dev/gcc-trunk-build/./gcc -nostdinc++ -L/home/fdt/dev/gcc-trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/src -L/home/fdt/dev/gcc-trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -B/home/fdt/dev/gcc-trunk-build/x86_64-unknown-linux-gnu/./libstdc++-v3/src/.libs -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE -DLOCALEDIR="." -nostdinc++ -I/home/fdt/dev/gcc-trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/home/fdt/dev/gcc-trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include -I/home/fdt/dev/gcc-trunk/libstdc++-v3/libsupc++ -I/home/fdt/dev/gcc-trunk/libstdc++-v3/include/backward -I/home/fdt/dev/gcc-trunk/libstdc++-v3/testsuite/util /home/fdt/dev/gcc-trunk/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc -std=gnu++0x ./libtestc++.a -Wl,--gc-sections -lm -D_GLIBCXX_DEBUG -o ./1.exe (timeout = 600) In file included from /home/fdt/dev/gcc-trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/unordered_set:46:0, from /home/fdt/dev/gcc-trunk/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/1.cc:22: /home/fdt/dev/gcc-trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/unordered_set.h:282:58: internal compiler error: tree check: accessed elt 6 of tree_vec with 5 elts in tsubst, at cp/pt.c:11144
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
compiler exited with status 1

I know that 4.7 is going to be released soon so I prefer to report it quickly. I should be able to submit a complete patch for hashtable generating this ICE if the error message is not enough.

François


  • ICE François Dumont

Reply via email to