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 tree-optimization/103851] ICE in gimple_range_global with -ftrivial-auto-var-init=pattern since r12-3433-ga25e0b5e6ac8a77a
Date: Mon, 03 Jan 2022 11:55:32 +0000	[thread overview]
Message-ID: <bug-103851-4-zJ7DSkB1tl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103851-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Indeed what gimple_ranger::export_global_ranges does is a bit iffy but we
shouldn't have SSA names not in the free list with a NULL def stmts.

The SSA name in question is allocated here:

 #2  0x000000000135e968 in clear_padding_type (buf=0x7fffffffaeb0, 
    type=<array_type 0x7ffff66d9738>, sz=96, for_auto_init=true)
    at /home/rguenther/src/gcc3/gcc/gimple-fold.c:4774
4774              tree end = make_ssa_name (TREE_TYPE (buf->base));

it's defining stmt is cleared via move_sese_region_to_fn doing in
replace_ssa_name

      /* Now that we've used the def stmt to define new_name, make sure it
         doesn't define name anymore.  */
      SSA_NAME_DEF_STMT (name) = NULL;

but we expect those SSA names to be released later but that only happens when
gimple_in_ssa_p:

  if (gimple_in_ssa_p (cfun))
    { 
      /* We need to release ssa-names in a defined order, so first find them,
         and then iterate in ascending version order.  */
      bitmap release_names = BITMAP_ALLOC (NULL);
      vars_map.traverse<void *, gather_ssa_name_hash_map_from> (release_names);
      bitmap_iterator bi;
      unsigned i;
      EXECUTE_IF_SET_IN_BITMAP (release_names, 0, i, bi)
        release_ssa_name (ssa_name (i));

  parent reply	other threads:[~2022-01-03 11:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28 14:13 [Bug tree-optimization/103851] New: ICE in gimple_range_global at gcc/value-query.cc:424 " marxin at gcc dot gnu.org
2021-12-28 14:13 ` [Bug tree-optimization/103851] " marxin at gcc dot gnu.org
2021-12-28 21:24 ` [Bug tree-optimization/103851] ICE in gimple_range_global with -ftrivial-auto-var-init=pattern " pinskia at gcc dot gnu.org
2021-12-28 21:29 ` pinskia at gcc dot gnu.org
2022-01-03 11:55 ` rguenth at gcc dot gnu.org [this message]
2022-01-03 12:51 ` cvs-commit at gcc dot gnu.org
2022-01-03 12:52 ` rguenth 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-103851-4-zJ7DSkB1tl@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).