public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107332] New: internal compiler error: in tsubst_copy, at cp/pt.c:15751
@ 2022-10-20 10:34 dreamcooled at gmail dot com
2022-10-20 11:05 ` [Bug c++/107332] " marxin at gcc dot gnu.org
2022-10-20 15:43 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dreamcooled at gmail dot com @ 2022-10-20 10:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107332
Bug ID: 107332
Summary: internal compiler error: in tsubst_copy, at
cp/pt.c:15751
Product: gcc
Version: 9.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dreamcooled at gmail dot com
Target Milestone: ---
I'm getting an ICE when compiling the following program on x86-64 gcc 9.5.
Tried it on godbolt.org with -std=c++17 command line options.
The bug seems to be fixed in > gcc 10.
#include <type_traits>
template <typename T> void Invoke()
{
auto f = [](auto stateIdIntegralConstant) {
if constexpr
(std::integral_constant<std::size_t,stateIdIntegralConstant>() == 0)
{
}
};
f(std::integral_constant<std::size_t, 0>{});
}
int main()
{
Invoke<int>();
}
Compiler output:
<source>: In instantiation of 'Invoke() [with T = int]::<lambda(auto:1)> [with
auto:1 = std::integral_constant<long unsigned int, 0>]':
<source>:10:6: required from 'void Invoke() [with T = int]'
<source>:15:16: required from here
<source>:6:28: internal compiler error: in tsubst_copy, at cp/pt.c:15751
6 | if constexpr
(std::integral_constant<std::size_t,stateIdIntegralConstant>() == 0)
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1
I see there are possible duplicates of this bug, but all are in state
resolved/fixed and I'm not sure if it is really the same bug.
If it is the same bug, I was hoping that the fix could be backported to gcc 9,
since I'm using only standard c++17 without any experimental features...
Thank You.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107332] internal compiler error: in tsubst_copy, at cp/pt.c:15751
2022-10-20 10:34 [Bug c++/107332] New: internal compiler error: in tsubst_copy, at cp/pt.c:15751 dreamcooled at gmail dot com
@ 2022-10-20 11:05 ` marxin at gcc dot gnu.org
2022-10-20 15:43 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-20 11:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107332
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
CC| |marxin at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
> If it is the same bug, I was hoping that the fix could be backported to gcc
> 9, since I'm using only standard c++17 without any experimental features...
Note, gcc-9 branch is out of support. The issue is fixed with
r10-6517-g1e042b396e2a84e3, so please update to at least GCC 10.x.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107332] internal compiler error: in tsubst_copy, at cp/pt.c:15751
2022-10-20 10:34 [Bug c++/107332] New: internal compiler error: in tsubst_copy, at cp/pt.c:15751 dreamcooled at gmail dot com
2022-10-20 11:05 ` [Bug c++/107332] " marxin at gcc dot gnu.org
@ 2022-10-20 15:43 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-20 15:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107332
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.0
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=92654
Keywords| |ice-on-valid-code
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-20 15:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 10:34 [Bug c++/107332] New: internal compiler error: in tsubst_copy, at cp/pt.c:15751 dreamcooled at gmail dot com
2022-10-20 11:05 ` [Bug c++/107332] " marxin at gcc dot gnu.org
2022-10-20 15:43 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).