public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/98621] New: ICE: x from g referenced in f
Date: Mon, 11 Jan 2021 14:41:27 +0000	[thread overview]
Message-ID: <bug-98621-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 98621
           Summary: ICE: x from g referenced in f
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

Here is an error-recovery ICE:

$ cat test.c
int f() {
  int g(x) int x;
  int a[x];
}
$ aarch64-elf-gcc -c test.c
test.c: In function 'g':
test.c:4:1: error: expected declaration specifiers before '}' token
    4 | }
      | ^
test.c:3:7: error: declaration for parameter 'a' but no such parameter
    3 |   int a[x];
      |       ^
test.c:5: error: expected '{' at end of input
test.c: In function 'f':
test.c:4:1: error: expected declaration or statement at end of input
    4 | }
      | ^
test.c:1:5: internal compiler error: x from g referenced in f
    1 | int f() {
      |     ^
0xeae7e0 convert_nonlocal_reference_op
        /home/alecop01/toolchain/src/gcc/gcc/tree-nested.c:1163
0x1181546 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        /home/alecop01/toolchain/src/gcc/gcc/tree.c:12095
0xaa2a6c walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-walk.c:202
0xaa384e walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-walk.c:596
0xaa3b2c walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-walk.c:51
0xaa38ca walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-walk.c:605
0xaa3b2c walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
        /home/alecop01/toolchain/src/gcc/gcc/gimple-walk.c:51
0xea87ca walk_body
        /home/alecop01/toolchain/src/gcc/gcc/tree-nested.c:811
0xea8857 walk_function
        /home/alecop01/toolchain/src/gcc/gcc/tree-nested.c:822
0xea8857 walk_all_functions
        /home/alecop01/toolchain/src/gcc/gcc/tree-nested.c:887
0xeb3bf1 lower_nested_functions(tree_node*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-nested.c:3698
0x8d883b cgraph_node::analyze()
        /home/alecop01/toolchain/src/gcc/gcc/cgraphunit.c:676
0x8db7d2 analyze_functions
        /home/alecop01/toolchain/src/gcc/gcc/cgraphunit.c:1235
0x8dcc87 symbol_table::finalize_compilation_unit()
        /home/alecop01/toolchain/src/gcc/gcc/cgraphunit.c:2513
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

             reply	other threads:[~2021-01-11 14:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 14:41 acoplan at gcc dot gnu.org [this message]
2021-01-16 22:07 ` [Bug c/98621] " pinskia at gcc dot gnu.org
2021-07-19  7:30 ` [Bug c/98621] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-07-19  7:31 ` pinskia at gcc dot gnu.org
2021-08-28 20:45 ` pinskia at gcc dot gnu.org
2021-12-13  4:34 ` pinskia at gcc dot gnu.org
2022-01-21 13:21 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug c/98621] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 10:38 ` [Bug c/98621] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-03-23 20:20 ` pinskia 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-98621-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).