public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115572] New: internal compiler error: in dependent_type_p, at cp/pt.cc:28020
@ 2024-06-21  2:38 iamanonymous.cs at gmail dot com
  2024-06-21  2:40 ` [Bug c++/115572] " iamanonymous.cs at gmail dot com
  2024-06-26 16:39 ` [Bug c++/115572] ICE: " mpolacek at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2024-06-21  2:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115572
           Summary: internal compiler error: in dependent_type_p, at
                    cp/pt.cc:28020
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---
            Target: x86_64

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/115572] internal compiler error: in dependent_type_p, at cp/pt.cc:28020
  2024-06-21  2:38 [Bug c++/115572] New: internal compiler error: in dependent_type_p, at cp/pt.cc:28020 iamanonymous.cs at gmail dot com
@ 2024-06-21  2:40 ` iamanonymous.cs at gmail dot com
  2024-06-26 16:39 ` [Bug c++/115572] ICE: " mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2024-06-21  2:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Anonymous <iamanonymous.cs at gmail dot com> ---
*******************************************************************************
The compiler produces an internal error in lookup_template_class when compiling
the provided code with the specified options. 
The issue can also be reproduced on Compiler Explorer.

*******************************************************************************
OS and Platform:
# uname -a
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /root/gdbtest/gcc/obj/../gcc/configure
--prefix=/root/gdbtest/gcc/gcc-15 --enable-languages=c,c++,fortran,go
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240509 (experimental) (GCC) 
*******************************************************************************
Program:
# cat source_code_1.cpp

template <class... Ts>
auto f(Ts...) {
  [] { enum class e : Ts {}; };
}

int main() {
  f(0, true);
}


*******************************************************************************
Command Lines:
# g++ source_code_1.cpp  -std=c++2a -Wall -Wextra -pedantic
-fsanitize=undefined -fsanitize=address -O2 -c -o source_code_1.o
source_code_1.cpp: In instantiation of ‘auto f(Ts ...) [with Ts = {int,
bool}]’:
source_code_1.cpp:7:4:   required from here
    7 |   f(0, true);
      |   ~^~~~~~~~~
source_code_1.cpp:3:19: internal compiler error: in dependent_type_p, at
cp/pt.cc:28020
    3 |   [] { enum class e : Ts {}; };
      |                   ^
0x825d35 dependent_type_p(tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:28020
0xb55fd3 start_enum(tree_node*, tree_node*, tree_node*, tree_node*, bool,
bool*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/decl.cc:17113
0xcde80b lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:10268
0xcd2cd0 tsubst(tree_node*, tree_node*, int, tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:16265
0xccf2d4 tsubst_decl
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:15435
0xcc77e4 tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18541
0xcc6106 tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18410
0xcc6106 tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18424
0xcc6bee tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18797
0xce1718 tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18410
0xce1718 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:19850
0xcbe1a0 tsubst_expr(tree_node*, tree_node*, int, tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:21757
0xcc4837 tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:19482
0xcc55cc tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18442
0xcc6106 tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18410
0xcc6106 tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18424
0xcc6bee tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18797
0xce0b52 tsubst_stmt
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:18410
0xce0b52 instantiate_body
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:27107
0xcc4425 instantiate_decl(tree_node*, bool, bool)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:27392
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

*******************************************************************************

Also ICE on trunk, compiler explorer:https://godbolt.org/z/7aPr9fWxn

*******************************************************************************

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/115572] ICE: in dependent_type_p, at cp/pt.cc:28020
  2024-06-21  2:38 [Bug c++/115572] New: internal compiler error: in dependent_type_p, at cp/pt.cc:28020 iamanonymous.cs at gmail dot com
  2024-06-21  2:40 ` [Bug c++/115572] " iamanonymous.cs at gmail dot com
@ 2024-06-26 16:39 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-06-26 16:39 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-06-26

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Even gcc 8 ICEs.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-26 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-21  2:38 [Bug c++/115572] New: internal compiler error: in dependent_type_p, at cp/pt.cc:28020 iamanonymous.cs at gmail dot com
2024-06-21  2:40 ` [Bug c++/115572] " iamanonymous.cs at gmail dot com
2024-06-26 16:39 ` [Bug c++/115572] ICE: " mpolacek 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).