https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96741

            Bug ID: 96741
           Summary: ICE in value_dependent_expression_p when compiling
                    Boost.Xpressive in C++03 mode
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andysem at mail dot ru
  Target Milestone: ---

Created attachment 49097
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49097&action=edit
Preprocessed source of the test that fails to compile with ICE

Attached is the preprocessed source of a Boost.Log test that uses
Boost.Xpressive, which fails to compile with ICE in C++03 mode. The same code
compiles in C++11 mode. Also compiles with gcc 9.3, both in C++03 and C++11.

$ "g++-10"   -std=c++03 -fPIC -m64 -pthread -O0 -fno-inline -Wall -g
-fno-strict-aliasing -ftemplate-depth-1024 -DBOOST_ALL_NO_LIB=1
-DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_CHRONO_DYN_LINK=1
-DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_LOG_DYN_LINK=1
-DBOOST_LOG_SETUP_DYN_LINK=1 -DBOOST_LOG_USE_AVX2 -DBOOST_LOG_USE_SSSE3
-DBOOST_TEST_DYN_LINK=1 -DBOOST_TEST_NO_AUTO_LINK=1 -DBOOST_THREAD_BUILD_DLL=1
-DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -D_XOPEN_SOURCE=600  -I"."
-I"libs/log/test/common"  -c -o "filt_matches_xpressive.o"
"libs/log/test/run/filt_matches_xpressive.cpp"

In file included from ./boost/assert.hpp:58,
                 from
./boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:16,
                 from ./boost/xpressive/detail/core/matchers.hpp:46,
                 from ./boost/xpressive/detail/core/linker.hpp:35,
                 from ./boost/xpressive/detail/static/static.hpp:19,
                 from
./boost/xpressive/detail/static/transforms/as_matcher.hpp:18,
                 from ./boost/xpressive/detail/static/grammar.hpp:21,
                 from ./boost/xpressive/basic_regex.hpp:28,
                 from ./boost/xpressive/regex_compiler.hpp:30,
                 from ./boost/xpressive/xpressive_dynamic.hpp:17,
                 from libs/log/test/run/filt_matches_xpressive.cpp:18:
./boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp: In
instantiation of ‘boost::xpressive::detail::simple_repeat_matcher<Xpr,
Greedy>::simple_repeat_matcher(const Xpr&, unsigned int, unsigned int,
std::size_t) [with Xpr =
boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char,
boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>,
boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char,
boost::xpressive::cpp_regex_traits<char> > > > >; Greedy = mpl_::bool_<true>;
std::size_t = long unsigned int]’:
./boost/xpressive/detail/dynamic/dynamic.hpp:216:48:   required from ‘void
boost::xpressive::detail::make_simple_repeat(const
boost::xpressive::detail::quant_spec&,
boost::xpressive::detail::sequence<BidiIter>&, const Xpr&) [with BidiIter =
const char*; Xpr =
boost::xpressive::detail::matcher_wrapper<boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char,
boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>,
boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char,
boost::xpressive::cpp_regex_traits<char> > > > >]’
./boost/xpressive/detail/dynamic/dynamic.hpp:130:31:   required from ‘void
boost::xpressive::detail::dynamic_xpression<Matcher, BidiIter>::repeat_(const
boost::xpressive::detail::quant_spec&,
boost::xpressive::detail::sequence<BidiIter>&, mpl_::int_<1>, mpl_::false_)
const [with Matcher =
boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char,
boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>,
boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char,
boost::xpressive::cpp_regex_traits<char> > > >; BidiIter = const char*;
mpl_::false_ = mpl_::bool_<false>]’
./boost/xpressive/detail/dynamic/dynamic.hpp:96:22:   required from ‘void
boost::xpressive::detail::dynamic_xpression<Matcher, BidiIter>::repeat(const
boost::xpressive::detail::quant_spec&,
boost::xpressive::detail::sequence<BidiIter>&) const [with Matcher =
boost::xpressive::detail::charset_matcher<boost::xpressive::regex_traits<char,
boost::xpressive::cpp_regex_traits<char> >, mpl_::bool_<false>,
boost::xpressive::detail::compound_charset<boost::xpressive::regex_traits<char,
boost::xpressive::cpp_regex_traits<char> > > >; BidiIter = const char*]’
./boost/xpressive/detail/dynamic/dynamic.hpp:94:18:   required from here
./boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:81:37: internal
compiler error: in value_dependent_expression_p, at cp/pt.c:26439
   81 |             BOOST_ASSERT(0 != width && unknown_width() != width);
      |                          ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
./boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp:81:13: note: in
expansion of macro ‘BOOST_ASSERT’
   81 |             BOOST_ASSERT(0 != width && unknown_width() != width);
      |             ^~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.

$ g++-10 -v
Using built-in specs.
COLLECT_GCC=g++-10
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
10-20200411-0ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-10
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none,amdgcn-amdhsa,hsa --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200411 (experimental) [master revision
bb87d5cc77d:75961caccb7:f883c46b4877f637e0fa5025b4d6b5c9040ec566] (Ubuntu
10-20200411-0ubuntu1) 

This happens on Kubuntu 20.04 x86_64.

Reply via email to