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

--- Comment #5 from Dmitry G. Dyachenko <dimhen at gmail dot com> ---
r262559 PASS
r262747 FAIL

$ cat x.ii
class a {
  int b;
};
int const c = 0, d = 1, f = 2, g = 3;
struct B {
  typedef a h;
  h i;
};
template <class> B j();
template <class> struct k { static B const e; };
template <class l> B const k<l>::e = j<l>();
inline B m() {
  switch (0) {
  case c:
  case d:
    return k<int>::e;
  case f:
  case g:;
  }
}

$ /usr/local/gcc_current/bin/g++ -std=c++98 -g -flto x.ii
lto1: internal compiler error: in gen_member_die, at dwarf2out.c:24935
0x5e5fef gen_member_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:24935
0x5e5fef gen_struct_or_union_type_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25130
0x97104f gen_tagged_type_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25331
0x97143f gen_typedef_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25245
0x9758d6 gen_decl_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:26231
0x96fe7c gen_type_die_with_usage
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25396
0x970d76 gen_type_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25580
0x975baf gen_decl_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:26299
0x98f09a gen_member_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25034
0x98f09a gen_struct_or_union_type_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25130
0x97104f gen_tagged_type_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25331
0x9706cc gen_type_die_with_usage
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25526
0x970d76 gen_type_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:25580
0x97d26c modified_type_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:13397
0x97d46d modified_type_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:13267
0x97e589 add_type_attribute
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:21511
0x97f5fc gen_variable_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:23748
0x975af2 gen_decl_die
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:26288
0x97639e dwarf2out_decl
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:26770
0x99147f dwarf2out_late_global_decl
        /home/dimhen/src/gcc_current/gcc/dwarf2out.c:26467
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ /usr/local/gcc_current/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc_current/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-pc-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/usr/local/gcc_current --enable-checking=yes,df,fold,rtl,extra
--enable-languages=c,c++,lto --disable-multilib --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl
--enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --with-tune=native
Thread model: posix
gcc version 9.0.0 20180716 (experimental) [trunk revision 262747] (GCC)

Reply via email to