public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "k.even-mendoza at imperial dot ac.uk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/106764] New: ICE on invalid code in tree check: expected function_type or method_type, have error_mark in gimplify_call_expr, at gimplify.cc
Date: Sun, 28 Aug 2022 15:10:08 +0000	[thread overview]
Message-ID: <bug-106764-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 106764
           Summary: ICE on invalid code in tree check: expected
                    function_type or method_type, have error_mark in
                    gimplify_call_expr, at gimplify.cc
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: k.even-mendoza at imperial dot ac.uk
  Target Milestone: ---

This code leads to ICE in GCC-12 and 13:
===
(*a)();
b(){a()} a;
===

We are doing a study about compiler fuzzers. We got this from one of the tools.
I wonder if such a bug is interesting even if the program is chopped in the
middle?

1/1934d6e2aee70d21f4a7d16c0d1ff2867764c085.c: In function 'b':
1/1934d6e2aee70d21f4a7d16c0d1ff2867764c085.c:2:5: internal compiler error: tree
check: expected function_type or method_type, have error_mark in
gimplify_call_expr, at gimplify.cc:3681
    2 | b(){a()} a;
      |     ^~~
0x7ee3f2 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        .././../gcc-source/gcc/tree.cc:8817
0x72df76 tree_check2(tree_node*, char const*, int, char const*, tree_code,
tree_code)
        .././../gcc-source/gcc/tree.h:3527
0x72df76 gimplify_call_expr
        .././../gcc-source/gcc/gimplify.cc:3681
0xc3efa5 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        .././../gcc-source/gcc/gimplify.cc:15178
0xc426e6 gimplify_stmt(tree_node**, gimple**)
        .././../gcc-source/gcc/gimplify.cc:7153
0xc42ea5 gimplify_bind_expr
        .././../gcc-source/gcc/gimplify.cc:1434
0xc3f176 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        .././../gcc-source/gcc/gimplify.cc:15407
0xc50fbf gimplify_stmt(tree_node**, gimple**)
        .././../gcc-source/gcc/gimplify.cc:7153
0xc50fbf gimplify_body(tree_node*, bool)
        .././../gcc-source/gcc/gimplify.cc:16463
0xc5140b gimplify_function_tree(tree_node*)
        .././../gcc-source/gcc/gimplify.cc:16662
0xa7d1b7 cgraph_node::analyze()
        .././../gcc-source/gcc/cgraphunit.cc:676
0xa7fc87 analyze_functions
        .././../gcc-source/gcc/cgraphunit.cc:1240
0xa8095d symbol_table::finalize_compilation_unit()
        .././../gcc-source/gcc/cgraphunit.cc:2500
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.
user42@srg01:~/git/directed-compiler-fuzzing-code/scripts/8-crash-testing/reduce$
more 1/1934d6e2aee70d21f4a7d16c0d1ff2867764c085.c

             reply	other threads:[~2022-08-28 15:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-28 15:10 k.even-mendoza at imperial dot ac.uk [this message]
2022-08-28 15:51 ` [Bug c/106764] " pinskia at gcc dot gnu.org
2022-08-29  8:36 ` rguenth at gcc dot gnu.org
2022-08-29 13:41 ` marxin at gcc dot gnu.org
2022-10-22  0:13 ` [Bug c/106764] [12/13 Regression] " pinskia at gcc dot gnu.org
2022-11-15 19:37 ` pinskia at gcc dot gnu.org
2022-11-17 20:06 ` pinskia at gcc dot gnu.org
2022-11-17 20:21 ` pinskia at gcc dot gnu.org
2022-11-18 17:03 ` cvs-commit at gcc dot gnu.org
2022-11-18 17:05 ` 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-106764-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).