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

            Bug ID: 87539
           Summary: internal compiler error when compiling project with Os
                    optimization flag
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: r4sas at i2pd dot xyz
  Target Milestone: ---

GCC info:
Using built-in specs.
COLLECT_GCC=C:\msys64-rack\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64-rack/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-8.2.0/configure --prefix=/mingw64
--with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
--with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include
--libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64
--with-tune=generic --enable-languages=ada,c,lto,c++,objc,obj-c++,fortran
--enable-shared --enable-static --enable-libatomic --enable-threads=posix
--enable-graphite --enable-fully-dynamic-string
--enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes
--disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check
--enable-lto --enable-libgomp --disable-multilib --enable-checking=release
--disable-rpath --disable-win32-registry --disable-nls --disable-werror
--disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64
--with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64
--with-pkgversion='Rev3, Built by MSYS2 project'
--with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as
--with-gnu-ld
Thread model: posix
gcc version 8.2.0 (Rev3, Built by MSYS2 project)

Command line:
g++ -Os -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWIN32_APP -Wall
-Wextra -std=c++11 -Ilibi2pd -Ilibi2pd_client -Idaemon -I. -maes -mavx -c -o
obj/libi2pd_client/ClientContext.o libi2pd_client/ClientContext.cpp

Compiler output:
In file included from
C:/msys64-rack/mingw64/include/boost/property_tree/ptree.hpp:516,
                 from libi2pd_client/ClientContext.cpp:3:
C:/msys64-rack/mingw64/include/boost/property_tree/detail/ptree_implementation.hpp:
In instantiation of 'boost::optional<U> boost::property_tree::basic_ptree<Key,
Data, KeyCompare>::get_value_optional() const [with Type = int; Key =
std::__cxx11::basic_string<char>; Data = std::__cxx11::basic_string<char>;
KeyCompare = std::less<std::__cxx11::basic_string<char> >]':
C:/msys64-rack/mingw64/include/boost/property_tree/detail/ptree_implementation.hpp:814:66:
  required from 'boost::optional<U> boost::property_tree::basic_ptree<Key,
Data, KeyCompare>::get_optional(const path_type&) const [with Type = int; Key =
std::__cxx11::basic_string<char>; Data = std::__cxx11::basic_string<char>;
KeyCompare = std::less<std::__cxx11::basic_string<char> >;
boost::property_tree::basic_ptree<Key, Data, KeyCompare>::path_type =
boost::property_tree::string_path<std::__cxx11::basic_string<char>,
boost::property_tree::id_translator<std::__cxx11::basic_string<char> > >]'
C:/msys64-rack/mingw64/include/boost/property_tree/detail/ptree_implementation.hpp:781:34:
  required from 'typename
boost::disable_if<boost::property_tree::detail::is_translator<Type>,
Type>::type boost::property_tree::basic_ptree<Key, Data, KeyCompare>::get(const
path_type&, const Type&) const [with Type = int; Key =
std::__cxx11::basic_string<char>; Data = std::__cxx11::basic_string<char>;
KeyCompare = std::less<std::__cxx11::basic_string<char> >; typename
boost::disable_if<boost::property_tree::detail::is_translator<Type>,
Type>::type = int; boost::property_tree::basic_ptree<Key, Data,
KeyCompare>::path_type =
boost::property_tree::string_path<std::__cxx11::basic_string<char>,
boost::property_tree::id_translator<std::__cxx11::basic_string<char> > >]'
libi2pd_client/ClientContext.cpp:457:85:   required from here
C:/msys64-rack/mingw64/include/boost/property_tree/detail/ptree_implementation.hpp:735:59:
internal compiler error: in tsubst_default_argument, at cp/pt.c:12714
             typename translator_between<data_type, Type>::type());
                                                           ^~~~~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.

Preprocessed file in attachment. By the way, when used -O2 optimization flag,
that source file compiles without problems.

Reply via email to