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

            Bug ID: 84736
           Summary: When compiling with -g -O2 internal compiler error: in
                    force_type_die, at dwarf2out.c:25111
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kuba.skowron at gmail dot com
  Target Milestone: ---

Created attachment 43579
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43579&action=edit
Zipped first.ii file

There is internal compiler error when compiling with -g -O2 (ii file attached).

$ g++-7 -save-temps -Wall -g -O2 first.cpp
In file included from osd/OSD.cc:51:0:
osd/ReplicatedPG.h: In destructor ‘virtual
ReplicatedPG::WaitTrimTimer::WaitTrimTimer(boost::statechart::state<ReplicatedPG::WaitTrimTimer,
ReplicatedPG::Trimming>::my_context)::OnTimer::~OnTimer()’:
osd/ReplicatedPG.h:1667:14: internal compiler error: in force_type_die, at
dwarf2out.c:25111
       struct OnTimer : Context {
              ^~~~~~~
0x8206ba force_type_die
        ../../src/gcc/dwarf2out.c:25111
0x82089b get_context_die
        ../../src/gcc/dwarf2out.c:25025
0x82089b force_decl_die
        ../../src/gcc/dwarf2out.c:25044
0x81ba47 gen_subprogram_die
        ../../src/gcc/dwarf2out.c:21905
0x816138 gen_decl_die
        ../../src/gcc/dwarf2out.c:25347
0x816e6e dwarf2out_decl
        ../../src/gcc/dwarf2out.c:25856
0x81cb42 dwarf2out_abstract_function
        ../../src/gcc/dwarf2out.c:21681
0xb46695 expand_call_inline
        ../../src/gcc/tree-inline.c:4887
0xb48084 gimple_expand_calls_inline
        ../../src/gcc/tree-inline.c:4917
0xb48084 optimize_inline_calls(tree_node*)
        ../../src/gcc/tree-inline.c:5057
0x113f6a9 early_inliner(function*)
        ../../src/gcc/ipa-inline.c:2721

$ g++-7 -v
Using built-in specs.
COLLECT_GCC=g++-7
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
7.2.0-1ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--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 --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--with-target-system-zlib --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 --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 7.2.0 (Ubuntu 7.2.0-1ubuntu1~16.04)

Reply via email to