public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105060] New: [10/11] ICE with consteval function: internal compiler error: in cp_gimplify_expr, at cp/cp-gimplify.c:14879 with keep-inline-functions
@ 2022-03-26 6:16 lutztonineubert at gmail dot com
2022-03-28 7:17 ` [Bug c++/105060] " rguenth at gcc dot gnu.org
2022-03-28 7:27 ` jakub at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: lutztonineubert at gmail dot com @ 2022-03-26 6:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105060
Bug ID: 105060
Summary: [10/11] ICE with consteval function: internal compiler
error: in cp_gimplify_expr, at cp/cp-gimplify.c:14879
with keep-inline-functions
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: lutztonineubert at gmail dot com
Target Milestone: ---
Compiled with g++ 10/11 and -fkeep-inline-functions -std=c++20. Doesn't seem to
happen with current trunk.
ERROR:
<source>: In constructor 'consteval
basic_format_string<Args>::basic_format_string(const S&) [with S = char [1];
Args = {char, <unnamed enum>}]':
<source>:19:5: internal compiler error: in gimplify_expr, at gimplify.c:14879
19 | if (!check()) {
| ^~
0x1786229 internal_error(char const*, ...)
???:0
0x678608 fancy_abort(char const*, int, char const*)
???:0
0xab0f92 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xab1068 gimplify_stmt(tree_node**, gimple**)
???:0
0xaaebb2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xab1068 gimplify_stmt(tree_node**, gimple**)
???:0
0xab212b gimplify_body(tree_node*, bool)
???:0
0xab259f gimplify_function_tree(tree_node*)
???:0
0x943cf7 cgraph_node::analyze()
???:0
0x94707d symbol_table::finalize_compilation_unit()
???:0
CODE:
template <typename T>
struct type_identity {
using type = T;
};
template <typename T>
using type_identity_t = typename type_identity<T>::type;
constexpr int check() {
return {};
}
template <typename... Args>
class basic_format_string {
public:
template <typename S>
consteval basic_format_string(const S& s) {
if (!check()) {
}
}
};
template <typename... Args>
using format_string = basic_format_string<char, type_identity_t<Args>...>;
template <typename... Args>
void test(format_string<Args...> format_str, const Args&... args) {}
enum { Blue };
void g() {
test("", Blue);
}
See: https://gcc.godbolt.org/z/M7v96YPn1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/105060] [10/11] ICE with consteval function: internal compiler error: in cp_gimplify_expr, at cp/cp-gimplify.c:14879 with keep-inline-functions
2022-03-26 6:16 [Bug c++/105060] New: [10/11] ICE with consteval function: internal compiler error: in cp_gimplify_expr, at cp/cp-gimplify.c:14879 with keep-inline-functions lutztonineubert at gmail dot com
@ 2022-03-28 7:17 ` rguenth at gcc dot gnu.org
2022-03-28 7:27 ` jakub at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-28 7:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105060
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.2.1, 12.0
Keywords| |ice-on-valid-code,
| |needs-bisection
Known to fail| |10.3.1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I cannot reproduce on the GCC 11 branch head, so maybe a fix was already
backported and this bug has a duplicate. Confirmed on the GCC 10 branch head.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/105060] [10/11] ICE with consteval function: internal compiler error: in cp_gimplify_expr, at cp/cp-gimplify.c:14879 with keep-inline-functions
2022-03-26 6:16 [Bug c++/105060] New: [10/11] ICE with consteval function: internal compiler error: in cp_gimplify_expr, at cp/cp-gimplify.c:14879 with keep-inline-functions lutztonineubert at gmail dot com
2022-03-28 7:17 ` [Bug c++/105060] " rguenth at gcc dot gnu.org
@ 2022-03-28 7:27 ` jakub at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-03-28 7:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105060
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-bisection |
CC| |jakub at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On the trunk this has been fixed with
r12-6423-g54fa7daefe35cacf4a933947d1802318da193c01
which has been backported to 11 in
r11-9499-g18abe529d092ca00903fe6a9ec5210c91d45030f
So dup of PR103912
*** This bug has been marked as a duplicate of bug 103912 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-28 7:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-26 6:16 [Bug c++/105060] New: [10/11] ICE with consteval function: internal compiler error: in cp_gimplify_expr, at cp/cp-gimplify.c:14879 with keep-inline-functions lutztonineubert at gmail dot com
2022-03-28 7:17 ` [Bug c++/105060] " rguenth at gcc dot gnu.org
2022-03-28 7:27 ` jakub 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).