Bug 100421 - Internal compiler error when overload resolution fails for prospective destructors.
Summary: Internal compiler error when overload resolution fails for prospective destru...
Status: RESOLVED DUPLICATE of bug 96745
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 11.1.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2021-05-04 18:45 UTC by gcc_report_187375
Modified: 2021-05-05 16:30 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed source code (188 bytes, text/plain)
2021-05-04 18:45 UTC, gcc_report_187375
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gcc_report_187375 2021-05-04 18:45:54 UTC
Created attachment 50750 [details]
Preprocessed source code

Source code:

==============
template<typename> concept C0 = true;
template<typename> concept C1 = true;

template<typename T>
struct X {
    ~X() requires C0<T> {}
    ~X() requires C1<T> {}
};

int main () {
    X<int> x;
}
==============


Compilation output (compiled with: gcc -v -save-temps -std=c++20):

==============
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.1.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --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 --disable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-YRKbe7/gcc-11-11.1.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-YRKbe7/gcc-11-11.1.0/debian/tmp-gcn/usr --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 11.1.0 (Ubuntu 11.1.0-1ubuntu1~18.04.1) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++20' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'
 /usr/lib/gcc/x86_64-linux-gnu/11/cc1plus -E -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE bug0.cpp -mtune=generic -march=x86-64 -std=c++20 -fpch-preprocess -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -o a-bug0.ii
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/11"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/11
 /usr/include/x86_64-linux-gnu/c++/11
 /usr/include/c++/11/backward
 /usr/lib/gcc/x86_64-linux-gnu/11/include
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++20' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'
 /usr/lib/gcc/x86_64-linux-gnu/11/cc1plus -fpreprocessed a-bug0.ii -quiet -dumpdir a- -dumpbase bug0.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -std=c++20 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -o a-bug0.s
GNU C++20 (Ubuntu 11.1.0-1ubuntu1~18.04.1) version 11.1.0 (x86_64-linux-gnu)
        compiled by GNU C version 11.1.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++20 (Ubuntu 11.1.0-1ubuntu1~18.04.1) version 11.1.0 (x86_64-linux-gnu)
        compiled by GNU C version 11.1.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: fa8709337e38341bd283d8a4fb935104
bug0.cpp: In instantiation of ‘struct X<int>’:
bug0.cpp:11:12:   required from here
bug0.cpp:5:8: internal compiler error: in type_memfn_rqual, at cp/typeck.c:10588
    5 | struct X {
      |        ^
0x1702697 internal_error(char const*, ...)
        ???:0
0x64082b fancy_abort(char const*, int, char const*)
        ???:0
0x7e48c1 build_exception_variant(tree_node*, tree_node*)
        ???:0
0x66d6ea finish_struct_1(tree_node*)
        ???:0
0x7bfc52 instantiate_class_template(tree_node*)
        ???:0
0x7f17ab complete_type(tree_node*)
        ???:0
0x6af20b start_decl_1(tree_node*, bool)
        ???:0
0x6c1e0f start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**)
        ???:0
0x7888ee c_parse_file()
        ???:0
0x85988d c_common_parse_file()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
==============
Comment 1 Patrick Palka 2021-05-05 16:30:55 UTC
Thanks for the bug report.  This is a dup of PR96745, I think.

*** This bug has been marked as a duplicate of bug 96745 ***