public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/113746] New: [14 Regression] ICE: tree check: expected enumeral_type, have error_mark in tsubst_expr, at cp/pt.cc:21458 with missing typename
Date: Sat, 03 Feb 2024 15:54:57 +0000	[thread overview]
Message-ID: <bug-113746-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 113746
           Summary: [14 Regression] ICE: tree check: expected
                    enumeral_type, have error_mark in tsubst_expr, at
                    cp/pt.cc:21458 with missing typename
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 57313
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57313&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc testcase.C -wrapper valgrind,-q
testcase.C:1:12: error: 'typename_T' has not been declared
    1 | template < typename_T > struct S {
      |            ^~~~~~~~~~
testcase.C:2:24: internal compiler error: tree check: expected enumeral_type,
have error_mark in tsubst_expr, at cp/pt.cc:21458
    2 |   enum { e0 = 0, e00 = e0 };
      |                        ^~
0x96eab7 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        /repo/gcc-trunk/gcc/tree.cc:8952
==27631== Invalid read of size 1
==27631==    at 0x2DF67C0: x86_64_fallback_frame_state (md-unwind-support.h:63)
==27631==    by 0x2DF67C0: uw_frame_state_for (unwind-dw2.c:1013)
==27631==    by 0x2DF7AFD: _Unwind_Backtrace (unwind.inc:303)
==27631==    by 0x2DA0F49: backtrace_full (backtrace.c:127)
==27631==    by 0x2D03556:
diagnostic_context::action_after_output(diagnostic_t) (diagnostic.cc:781)
==27631==    by 0x2D0376B: diagnostic_action_after_output (diagnostic.h:1002)
==27631==    by 0x2D0376B:
diagnostic_context::report_diagnostic(diagnostic_info*) (diagnostic.cc:1633)
==27631==    by 0x2D03AE8: diagnostic_impl(rich_location*, diagnostic_metadata
const*, int, char const*, __va_list_tag (*) [1], diagnostic_t)
(diagnostic.cc:1767)
==27631==    by 0x2D041B6: internal_error(char const*, ...)
(diagnostic.cc:2225)
==27631==    by 0x96EAB7: tree_check_failed(tree_node const*, char const*, int,
char const*, ...) (tree.cc:8952)
==27631==  Address 0x1 is not stack'd, malloc'd or (recently) free'd
==27631== 

testcase.C:2:24: internal compiler error: Segmentation fault
0x1816b62 crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:317
0x2df67c0 x86_64_fallback_frame_state
        ./md-unwind-support.h:63
0x2df67c0 uw_frame_state_for
        /repo/gcc-trunk/libgcc/unwind-dw2.c:1013
0x2df7afd _Unwind_Backtrace
        /repo/gcc-trunk/libgcc/unwind.inc:303
0x2da0f49 backtrace_full
        /repo/gcc-trunk/libbacktrace/backtrace.c:127
0x2d03556 diagnostic_context::action_after_output(diagnostic_t)
        /repo/gcc-trunk/gcc/diagnostic.cc:781
0x2d0376b diagnostic_action_after_output(diagnostic_context*, diagnostic_t)
        /repo/gcc-trunk/gcc/diagnostic.h:1002
0x2d0376b diagnostic_context::report_diagnostic(diagnostic_info*)
        /repo/gcc-trunk/gcc/diagnostic.cc:1633
0x2d03ae8 diagnostic_impl
        /repo/gcc-trunk/gcc/diagnostic.cc:1767
0x2d041b6 internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic.cc:2225
0x96eab7 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        /repo/gcc-trunk/gcc/tree.cc:8952

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-8771-20240203001826-g4b7d4d8a4af-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-8771-20240203001826-g4b7d4d8a4af-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240203 (experimental) (GCC)

             reply	other threads:[~2024-02-03 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03 15:54 zsojka at seznam dot cz [this message]
2024-02-03 21:52 ` [Bug c++/113746] " pinskia at gcc dot gnu.org
2024-02-04  5:17 ` pinskia at gcc dot gnu.org
2024-02-05  9:01 ` rguenth at gcc dot gnu.org
2024-02-11 13:40 ` fkastl at suse dot cz
2024-02-11 13:42 ` [Bug c++/113746] [14 Regression] ICE: tree check: expected enumeral_type, have error_mark in tsubst_expr, at cp/pt.cc:21458 with missing typename since r14-4796-g3e3d73ed5e85e7 sjames at gcc dot gnu.org
2024-02-11 13:42 ` sjames at gcc dot gnu.org
2024-02-11 13:57 ` pheeck at gcc dot gnu.org
2024-05-07  7:44 ` [Bug c++/113746] [14/15 " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113746-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).