Your message dated Tue, 17 Oct 2023 15:50:51 +0200 with message-id <[🔎] 6de51b28-6dcf-4e63-a3a4-5e22fc6ff25a@debian.org> and subject line Re: Bug#1053826: gcc-12: internal compiler error with template specialization on floating point non-type-param in C++20 mode has caused the Debian Bug report #1053826, regarding gcc-12: internal compiler error with template specialization on floating point non-type-param in C++20 mode to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 1053826: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053826 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gcc-12: internal compiler error with template specialization on floating point non-type-param in C++20 mode
- From: Andre Naujoks <andre.naujoks@keysight.com>
- Date: Thu, 12 Oct 2023 09:20:30 +0200
- Message-id: <[🔎] 169709523027.26708.5433196536347915060.reportbug@5cd20268jn.bwe.is.keysight.com>
Package: gcc-12 Version: 12.3.0-10 Severity: normal X-Debbugs-Cc: andre.naujoks@keysight.com Hello. The following piece of code generates a compiler error with gcc-12 in C++20 mode: template <typename T, float D> struct F { static double foo() { return D; } }; template <typename T> struct F<T, 1.0f> { static double foo() { return 1.0; } }; int main() { return F<void, 1.0f>::foo(); } gcc-13 in sid does compile this correctly. on godbolt only gcc-trunk, not gcc-13, compiles this, so from my point of view, it may be a Debian patch in gcc-13 in sid, which fixes this. The error (on gcc-12 from sid) is this: $ g++-12 -std=c++20 -o test test.cpp test.cpp: In function ‘int main()’: test.cpp:13:29: internal compiler error: in unify, at cp/pt.cc:24903 13 | return F<void, 1.0f>::foo(); | ^~ 0x7f41729256c9 __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7f4172925784 __libc_start_main_impl ../csu/libc-start.c:360 Please submit a full bug report, with preprocessed source (by using -freport- bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions. gcc in bookworm looks a little different but should be the same bug: $ g++ -std=c++20 -o test test.cpp test.cpp: In function 'int main()': test.cpp:13:29: internal compiler error: in unify, at cp/pt.cc:24832 13 | return F<void, 1.0f>::foo(); | ^~ 0x1afaeb6 internal_error(char const*, ...) ???:0 0x69ec5a fancy_abort(char const*, int, char const*) ???:0 0x813491 most_specialized_partial_spec(tree_node*, int) ???:0 0x830231 instantiate_class_template(tree_node*) ???:0 0x86621b complete_type(tree_node*) ???:0 0x7f5c79 c_parse_file() ???:0 0x8e019d c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport- bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions. Thanks in advance! Andre -- System Information: Debian Release: trixie/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 6.5.0-2-amd64 (SMP w/16 CPU threads; PREEMPT) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages gcc-12 depends on: ii binutils 2.41-6 ii cpp-12 12.3.0-10 ii gcc-12-base 12.3.0-10 ii libc6 2.37-12 ii libcc1-0 13.2.0-5 ii libgcc-12-dev 12.3.0-10 ii libgcc-s1 13.2.0-5 ii libgmp10 2:6.3.0+dfsg-2 ii libisl23 0.26-3 ii libmpc3 1.3.1-1 ii libmpfr6 4.2.1-1 ii libstdc++6 13.2.0-5 ii libzstd1 1.5.5+dfsg2-2 ii zlib1g 1:1.2.13.dfsg-3 Versions of packages gcc-12 recommends: ii libc6-dev 2.37-12 Versions of packages gcc-12 suggests: ii gcc-12-doc 12.2.0-1 pn gcc-12-locales <none> pn gcc-12-multilib <none> -- no debconf information
--- End Message ---
--- Begin Message ---This is fixed in GCC 13, available in testing and unstable. Doesn't look like a regression, so it's unlikely to be backported.
- To: Andre Naujoks <andre.naujoks@keysight.com>, 1053826@bugs.debian.org, 1053826-done@bugs.debian.org
- Subject: Re: Bug#1053826: gcc-12: internal compiler error with template specialization on floating point non-type-param in C++20 mode
- From: Matthias Klose <doko@debian.org>
- Date: Tue, 17 Oct 2023 15:50:51 +0200
- Message-id: <[🔎] 6de51b28-6dcf-4e63-a3a4-5e22fc6ff25a@debian.org>
- In-reply-to: <[🔎] 169709523027.26708.5433196536347915060.reportbug@5cd20268jn.bwe.is.keysight.com>
- References: <[🔎] 169709523027.26708.5433196536347915060.reportbug@5cd20268jn.bwe.is.keysight.com>
On 12.10.23 09:20, Andre Naujoks wrote:Package: gcc-12 Version: 12.3.0-10 Severity: normal X-Debbugs-Cc: andre.naujoks@keysight.com Hello. The following piece of code generates a compiler error with gcc-12 in C++20 mode: template <typename T, float D> struct F { static double foo() { return D; } }; template <typename T> struct F<T, 1.0f> { static double foo() { return 1.0; } }; int main() { return F<void, 1.0f>::foo(); } gcc-13 in sid does compile this correctly. on godbolt only gcc-trunk, not gcc-13, compiles this, so from my point of view, it may be a Debian patch in gcc-13 in sid, which fixes this. The error (on gcc-12 from sid) is this: $ g++-12 -std=c++20 -o test test.cpp test.cpp: In function ‘int main()’: test.cpp:13:29: internal compiler error: in unify, at cp/pt.cc:24903 13 | return F<void, 1.0f>::foo(); | ^~ 0x7f41729256c9 __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7f4172925784 __libc_start_main_impl ../csu/libc-start.c:360 Please submit a full bug report, with preprocessed source (by using -freport- bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions. gcc in bookworm looks a little different but should be the same bug: $ g++ -std=c++20 -o test test.cpp test.cpp: In function 'int main()': test.cpp:13:29: internal compiler error: in unify, at cp/pt.cc:24832 13 | return F<void, 1.0f>::foo(); | ^~ 0x1afaeb6 internal_error(char const*, ...) ???:0 0x69ec5a fancy_abort(char const*, int, char const*) ???:0 0x813491 most_specialized_partial_spec(tree_node*, int) ???:0 0x830231 instantiate_class_template(tree_node*) ???:0 0x86621b complete_type(tree_node*) ???:0 0x7f5c79 c_parse_file() ???:0 0x8e019d c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport- bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions. Thanks in advance! Andre -- System Information: Debian Release: trixie/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 6.5.0-2-amd64 (SMP w/16 CPU threads; PREEMPT) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages gcc-12 depends on: ii binutils 2.41-6 ii cpp-12 12.3.0-10 ii gcc-12-base 12.3.0-10 ii libc6 2.37-12 ii libcc1-0 13.2.0-5 ii libgcc-12-dev 12.3.0-10 ii libgcc-s1 13.2.0-5 ii libgmp10 2:6.3.0+dfsg-2 ii libisl23 0.26-3 ii libmpc3 1.3.1-1 ii libmpfr6 4.2.1-1 ii libstdc++6 13.2.0-5 ii libzstd1 1.5.5+dfsg2-2 ii zlib1g 1:1.2.13.dfsg-3 Versions of packages gcc-12 recommends: ii libc6-dev 2.37-12 Versions of packages gcc-12 suggests: ii gcc-12-doc 12.2.0-1 pn gcc-12-locales <none> pn gcc-12-multilib <none> -- no debconf information
--- End Message ---