public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/108354] [13 Regression] Dead Code Elimination Regression at -O2 since r13-89-gb3e98eb3396e16
Date: Tue, 31 Jan 2023 20:06:29 +0000	[thread overview]
Message-ID: <bug-108354-4-H3exk5RROg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108354-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> raised STORAGE_ERROR : stack overflow or erroneous memory access

0x00000000015769b4 in get_range_query (fun=<optimized out>) at
/home/apinski/src/upstream-gcc/gcc/gcc/value-query.h:143
143       return fun->x_range_query ? fun->x_range_query : &global_ranges;
(gdb) bt
#0  0x00000000015769b4 in get_range_query (fun=<optimized out>) at
/home/apinski/src/upstream-gcc/gcc/gcc/value-query.h:143
#1  ssa_name_has_boolean_range(tree_node*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/tree-ssanames.cc:534
#2  0x0000000001ae01a6 in generic_simplify_MINUS_EXPR(unsigned int, tree_code,
tree_node*, tree_node*, tree_node*) [clone .constprop.0] () at
/home/apinski/src/upstream-gcc/gcc/gcc/tree.h:3654
#3  0x0000000000fb1286 in fold_binary_loc(unsigned int, tree_code, tree_node*,
tree_node*, tree_node*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/fold-const.cc:10926
#4  0x0000000000fb8eeb in fold_build2_loc (loc=loc@entry=0,
code=code@entry=MINUS_EXPR, type=0x7ffff725c000, op0=op0@entry=0x7ffff7242d50,
op1=op1@entry=0x7ffff52a6870) at
/home/apinski/src/upstream-gcc/gcc/gcc/fold-const.cc:13824
#5  0x0000000000f7373f in get_inner_reference(tree_node*, poly_int_pod<1u,
long>*, poly_int_pod<1u, long>*, tree_node**, machine_mode*, int*, int*, int*)
() at /home/apinski/src/upstream-gcc/gcc/gcc/tree.h:3645
#6  0x00000000010a2546 in (anonymous
namespace)::isra_analyze_call(cgraph_edge*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/ipa-sra.cc:2167
#7  0x00000000010a32a8 in (anonymous
namespace)::isra_analyze_all_outgoing_calls (node=<error reading variable:
dwarf2_find_location_expression: Corrupted DWARF expression.>) at
/home/apinski/src/upstream-gcc/gcc/gcc/ipa-sra.cc:2202
#8  ipa_sra_summarize_function(cgraph_node*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/ipa-sra.cc:4540
#9  0x00000000010a5558 in (anonymous namespace)::ipa_sra_generate_summary() ()
at /home/apinski/src/upstream-gcc/gcc/gcc/ipa-sra.cc:2716
#10 0x0000000001242f23 in execute_ipa_summary_passes (ipa_pass=0x3a90670) at
/home/apinski/src/upstream-gcc/gcc/gcc/passes.cc:2297
(gdb) p cfun
$3 = (function *) 0x0

Ok, let me mark the pattern only for GIMPLE because it looks like we are
calling fold without setting cfun and still passing a SSA_NAME.
I suspect we might run into this issue with other code too but at least I hide
the latent bug ...

  parent reply	other threads:[~2023-01-31 20:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 12:41 [Bug tree-optimization/108354] New: Dead Code Elimination Regression at -O2 (trunk vs. 12.2.0) yann at ywg dot ch
2023-01-10 14:44 ` [Bug tree-optimization/108354] [13 Regression] Dead Code Elimination Regression at -O2 since r13-89-gb3e98eb3396e16 marxin at gcc dot gnu.org
2023-01-31  4:33 ` pinskia at gcc dot gnu.org
2023-01-31  4:52 ` pinskia at gcc dot gnu.org
2023-01-31  8:23 ` pinskia at gcc dot gnu.org
2023-01-31 20:01 ` pinskia at gcc dot gnu.org
2023-01-31 20:06 ` pinskia at gcc dot gnu.org [this message]
2023-01-31 20:07 ` pinskia at gcc dot gnu.org
2023-02-14 21:47 ` pinskia at gcc dot gnu.org
2023-02-14 21:48 ` 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-108354-4-H3exk5RROg@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).