public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/111650] New: ICE in build_deref, at d/d-codegen.cc:1650
@ 2023-09-30 22:58 arsen at gcc dot gnu.org
2023-10-01 19:43 ` [Bug d/111650] " ibuclaw at gdcproject dot org
2024-04-19 8:57 ` cvs-commit at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: arsen at gcc dot gnu.org @ 2023-09-30 22:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111650
Bug ID: 111650
Summary: ICE in build_deref, at d/d-codegen.cc:1650
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: arsen at gcc dot gnu.org
Target Milestone: ---
Created attachment 56020
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56020&action=edit
reduced reproducer, reduced from btdu
the attached code, with gdc -c <file>, produces the following ICE:
~/gcc/d-ice$ /usr/x86_64-pc-linux-gnu/gcc-bin/14/gdc -c
reduced.reduced/btdu/sample.d
reduced.reduced/btdu/sample.d: In function ‘__lambda3’:
reduced.reduced/btdu/sample.d:12:22: internal compiler error: in build_deref,
at d/d-codegen.cc:1650
12 | Root result;
| ^
0x55e60d72b7b0 build_deref(tree_node*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/d-codegen.cc:1650
0x55e60df1a6c6 declare_local_var(VarDeclaration*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/decl.cc:1637
0x55e60df1a9fd DeclVisitor::visit(VarDeclaration*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/decl.cc:850
0x55e60defff7f DeclVisitor::build_dsymbol(Dsymbol*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/decl.cc:254
0x55e60defff7f build_decl_tree(Dsymbol*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/decl.cc:1092
0x55e60df39c39 ExprVisitor::visit(DeclarationExp*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/expr.cc:1946
0x55e60df20560 build_expr(Expression*, bool, bool)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/expr.cc:3025
0x55e60df21a8b build_expr_dtor(Expression*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/expr.cc:3048
0x55e60df29531 IRVisitor::visit(ExpStatement*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:1076
0x55e60df207ef IRVisitor::build_stmt(Statement*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:274
0x55e60df207ef IRVisitor::visit(CompoundStatement*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:1093
0x55e60df207ef IRVisitor::visit(CompoundStatement*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:1083
0x55e60df207ef IRVisitor::build_stmt(Statement*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:274
0x55e60df207ef IRVisitor::visit(CompoundStatement*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:1093
0x55e60df207ef IRVisitor::visit(CompoundStatement*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:1083
0x55e60df2088f IRVisitor::build_stmt(Statement*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:274
0x55e60df2088f build_function_body(FuncDeclaration*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/toir.cc:1505
0x55e60df1b271 DeclVisitor::visit(FuncDeclaration*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/decl.cc:1051
0x55e60defff7f DeclVisitor::build_dsymbol(Dsymbol*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/decl.cc:254
0x55e60defff7f build_decl_tree(Dsymbol*)
/usr/src/debug/sys-devel/gcc-14.0.0_pre20230924/gcc-14-20230924/gcc/d/decl.cc:1092
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
~/gcc/d-ice 1 $
testcase reduced from https://github.com/CyberShadow/btdu
it is possible the reduction went awry, but the backtrace is identical before
and after reduction, so I hope it still homes in on the same bug
I've very little experience with D, so, apologies for the lack of analysis or
additional information.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug d/111650] ICE in build_deref, at d/d-codegen.cc:1650
2023-09-30 22:58 [Bug d/111650] New: ICE in build_deref, at d/d-codegen.cc:1650 arsen at gcc dot gnu.org
@ 2023-10-01 19:43 ` ibuclaw at gdcproject dot org
2024-04-19 8:57 ` cvs-commit at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: ibuclaw at gdcproject dot org @ 2023-10-01 19:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111650
--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Reduced a bit more.
---
module object;
ref V require(K, V)(ref V[K] aa, K key, lazy V value);
struct Root
{
ulong[3] f;
}
Root[ulong] roots;
Root getRoot(int fd, ulong rootID)
{
return roots.require(rootID,
{
Root result;
inoLookup(fd, () => result);
return result;
}());
}
void inoLookup(int, scope Root delegate()) { }
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug d/111650] ICE in build_deref, at d/d-codegen.cc:1650
2023-09-30 22:58 [Bug d/111650] New: ICE in build_deref, at d/d-codegen.cc:1650 arsen at gcc dot gnu.org
2023-10-01 19:43 ` [Bug d/111650] " ibuclaw at gdcproject dot org
@ 2024-04-19 8:57 ` cvs-commit at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-19 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111650
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:
https://gcc.gnu.org/g:4d4929fe0654d51b52a2bf6e6188d7aad0bf17ac
commit r14-10036-g4d4929fe0654d51b52a2bf6e6188d7aad0bf17ac
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Fri Apr 19 10:51:12 2024 +0200
d: Fix ICE in build_deref, at d/d-codegen.cc:1650 [PR111650]
PR d/111650
gcc/d/ChangeLog:
* decl.cc (get_fndecl_arguments): Move generation of frame type to
...
(DeclVisitor::visit (FuncDeclaration *)): ... here, after the call
to
build_closure.
gcc/testsuite/ChangeLog:
* gdc.dg/pr111650.d: New test.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-19 8:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-30 22:58 [Bug d/111650] New: ICE in build_deref, at d/d-codegen.cc:1650 arsen at gcc dot gnu.org
2023-10-01 19:43 ` [Bug d/111650] " ibuclaw at gdcproject dot org
2024-04-19 8:57 ` cvs-commit 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).