public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/101266] ICE with -g: in loc_list_from_tree_1, at dwarf2out.c:19421
Date: Wed, 30 Jun 2021 06:43:05 +0000 [thread overview]
Message-ID: <bug-101266-4-1kiwhgJ3Vu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101266-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101266
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|debug |c
Ever confirmed|0 |1
Version|tree-ssa |12.0
Last reconfirmed| |2021-06-30
Status|UNCONFIRMED |NEW
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. We hit
#1 0x0000000000d898e5 in loc_list_from_tree_1 (loc=
<compound_literal_expr 0x7ffff6688240>, want_address=0, context=0x0)
at /home/rguenther/src/gcc2/gcc/dwarf2out.c:19421
19421 gcc_unreachable ();
(gdb) l
19416 }
19417
19418 /* Otherwise this is a generic code; we should just lists all of
19419 these explicitly. We forgot one. */
19420 if (flag_checking)
19421 gcc_unreachable ();
(gdb) p loc
$1 = <compound_literal_expr 0x7ffff6688240>
(gdb) p debug_generic_expr (loc)
<<< Unknown tree: compound_literal_expr
int D.1943 = 1; >>>
and the original tree we ask for is
(long int) SAVE_EXPR <<<< Unknown tree: compound_literal_expr
int D.1943 = 1; >>>> + -1
this looks like some missed DECL_EXPR / gimplification or a missed error.
clang complains:
> clang-9 t.c -S
t.c:1:9: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
typedef U;
~~~~~~~ ^
t.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
fn8(U (*)[(int){1}]) {}
^
t.c:2:9: error: parameter name omitted
fn8(U (*)[(int){1}]) {}
^
2 warnings and 1 error generated.
but adding a parameter name doesn't fix anything. Note we call
dwarf2out_decl via
#14 0x0000000000d9f4f4 in dwarf2out_type_decl (
decl=<type_decl 0x7ffff656b428>, local=0)
at /home/rguenther/src/gcc2/gcc/dwarf2out.c:27099
#15 0x000000000120699d in rest_of_decl_compilation (
decl=<type_decl 0x7ffff656b428>, top_level=1, at_end=0)
at /home/rguenther/src/gcc2/gcc/passes.c:251
#16 0x0000000000a614a7 in finish_decl (decl=<type_decl 0x7ffff656b428>,
init_loc=246464, init=<tree 0x0>, origtype=<tree 0x0>,
asmspec_tree=<tree 0x0>) at /home/rguenther/src/gcc2/gcc/c/c-decl.c:5606
#17 0x0000000000a65c38 in grokdeclarator (declarator=0x385b320,
declspecs=0x385b170, decl_context=PARM, initialized=false, width=0x0,
decl_attrs=0x7fffffffd628, expr=0x7fffffffd648,
expr_const_operands=0x7fffffffd49f, deprecated_state=DEPRECATED_NORMAL)
at /home/rguenther/src/gcc2/gcc/c/c-decl.c:7171
so this is before any gimplification happened.
next prev parent reply other threads:[~2021-06-30 6:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 5:14 [Bug debug/101266] New: " cnsun at uwaterloo dot ca
2021-06-30 6:43 ` rguenth at gcc dot gnu.org [this message]
2021-06-30 7:25 ` [Bug c/101266] " marxin at gcc dot gnu.org
2021-06-30 11:04 ` [Bug debug/101266] " jakub at gcc dot gnu.org
2021-06-30 11:17 ` jakub at gcc dot gnu.org
2021-07-01 7:46 ` cvs-commit at gcc dot gnu.org
2021-07-01 7:54 ` jakub at gcc dot gnu.org
2021-07-18 23:29 ` cvs-commit at gcc dot gnu.org
2022-05-10 8:19 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:21 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:36 ` jakub 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-101266-4-1kiwhgJ3Vu@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).