public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ensadc at mailnesia dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/109756] New: "internal compiler error: tree check" when using the [[assume]] attribute with pack expansion
Date: Sat, 06 May 2023 10:33:00 +0000 [thread overview]
Message-ID: <bug-109756-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109756
Bug ID: 109756
Summary: "internal compiler error: tree check" when using the
[[assume]] attribute with pack expansion
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ensadc at mailnesia dot com
Target Milestone: ---
https://godbolt.org/z/WPn9aq8sr
====
bool f(auto... args) {
[[assume(args > 0)...]];
return ((args == 0) && ...);
}
bool g(int a, int b) {
return f(a, b);
}
====
<source>: In function 'bool f(auto:1 ...)':
<source>:2:28: internal compiler error: tree check: expected tree that contains
'common' structure, have 'expr_pack_expansion' in list_length, at tree.cc:3414
2 | [[assume(args > 0)...]];
| ^
0x235945e internal_error(char const*, ...)
???:0
0x96da3a tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
???:0
0xb20632 process_stmt_assume_attribute(tree_node*, tree_node*, unsigned int)
???:0
0xc7212f c_parse_file()
???:0
0xdb0d99 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 <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1
====
I believe that [[assume(args > 0)...]] is a valid pack expansion. The standard
says ([temp.variadic]/5):
> Pack expansions can occur in the following contexts:
> (5.8) - In an attribute-list ([dcl.attr.grammar]); the pattern is an attribute.
next reply other threads:[~2023-05-06 10:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 10:33 ensadc at mailnesia dot com [this message]
2023-05-06 16:40 ` [Bug c++/109756] " pinskia at gcc dot gnu.org
2023-05-06 16:54 ` jakub at gcc dot gnu.org
2023-05-06 16:59 ` pinskia at gcc dot gnu.org
2023-05-06 17:00 ` pinskia at gcc dot gnu.org
2023-05-07 19:02 ` jakub at gcc dot gnu.org
2023-05-08 10:56 ` jakub at gcc dot gnu.org
2023-05-08 11:26 ` jakub at gcc dot gnu.org
2023-05-09 14:07 ` cvs-commit at gcc dot gnu.org
2023-05-09 14:10 ` cvs-commit at gcc dot gnu.org
2023-05-10 9:41 ` cvs-commit 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-109756-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).