public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-4385] tree-optimization/107898 - ICE with -Walloca-larger-than Date: Tue, 29 Nov 2022 09:26:04 +0000 (GMT) [thread overview] Message-ID: <20221129092604.91272385515D@sourceware.org> (raw) https://gcc.gnu.org/g:9948daa4fd0f0ea0a9d56c2fefe1bca478554d27 commit r13-4385-g9948daa4fd0f0ea0a9d56c2fefe1bca478554d27 Author: Richard Biener <rguenther@suse.de> Date: Tue Nov 29 09:03:46 2022 +0100 tree-optimization/107898 - ICE with -Walloca-larger-than The following avoids ICEing with a mismatched prototype for alloca and -Walloca-larger-than using irange for checks which doesn't like mismatched types. PR tree-optimization/107898 * gimple-ssa-warn-alloca.cc (alloca_call_type): Check the type of the alloca argument is compatible with size_t before querying ranges. Diff: --- gcc/gimple-ssa-warn-alloca.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/gimple-ssa-warn-alloca.cc b/gcc/gimple-ssa-warn-alloca.cc index 83a241a3a4b..dcc62ca77bf 100644 --- a/gcc/gimple-ssa-warn-alloca.cc +++ b/gcc/gimple-ssa-warn-alloca.cc @@ -217,6 +217,7 @@ alloca_call_type (gimple *stmt, bool is_vla) int_range_max r; if (warn_limit_specified_p (is_vla) && TREE_CODE (len) == SSA_NAME + && types_compatible_p (TREE_TYPE (len), size_type_node) && get_range_query (cfun)->range_of_expr (r, len, stmt) && !r.varying_p ()) {
reply other threads:[~2022-11-29 9:26 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221129092604.91272385515D@sourceware.org \ --to=rguenth@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).