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/105173] [10/11/12 Regression] ICE: during GIMPLE pass: reassoc: verify_ssa failed (definition in block 2 follows the use) at -Ofast with decimals since r7-950-g8a85cee26eabf5cf
Date: Wed, 06 Apr 2022 09:40:42 +0000	[thread overview]
Message-ID: <bug-105173-4-QXXx0k8ygU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105173-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
  <bb 2> [local count: 1073741824]:
  i.0_1 = i;
  _2 = (_Decimal32) i.0_1;
  _12 = (_Decimal64) _2;
  _13 = (_Decimal64) d_8(D);
  _3 = _12 * _13;
  _4 = (_Decimal64) c_9(D);
  _5 = -_4;
  _6 = _3 * _5;
  d_10 = (_Decimal32) _6;
  _11 = (int) d_10;

Transforming _12 = (_Decimal64) _2;
 into _14 = _12 * -1.0e+0;
Transforming _3 = _12 * _13;
 into _15 = _14 * _4;
Transforming _6 = _3 * _5;
 into _6 = _15 * _13;

  <bb 2> [local count: 1073741824]:
  i.0_1 = i;
  _2 = (_Decimal32) i.0_1;
  _14 = _12 * -1.0e+0;
  _12 = (_Decimal64) _2;
  _13 = (_Decimal64) d_8(D);
  _4 = (_Decimal64) c_9(D);
  _15 = _14 * _4;
  _6 = _15 * _13;
  d_10 = (_Decimal32) _6;
  _11 = (int) d_10;
  return _11;

and the logic wrt

              gimple *insert_point
                = find_insert_point (stmt, oe1->op, oe2->op);
...
              if (insert_point == gsi_stmt (gsi))
                gsi_insert_before (&gsi, stmt, GSI_SAME_STMT);
              else
                insert_stmt_after (stmt, insert_point);

does not work for

(gdb) p debug_gimple_stmt (stmt)
_12 = (_Decimal64) _2;
$4 = void
(gdb) p oe1->op
$5 = <ssa_name 0x7ffff667e120 12>
(gdb) p oe2->op
$6 = <real_cst 0x7ffff6681540>

testing a fix.

  parent reply	other threads:[~2022-04-06  9:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06  4:21 [Bug tree-optimization/105173] New: [10/11/12 Regression] ICE: during GIMPLE pass: reassoc: verify_ssa failed (definition in block 2 follows the use) at -Ofast with decimals zsojka at seznam dot cz
2022-04-06  8:10 ` [Bug tree-optimization/105173] " rguenth at gcc dot gnu.org
2022-04-06  9:20 ` [Bug tree-optimization/105173] [10/11/12 Regression] ICE: during GIMPLE pass: reassoc: verify_ssa failed (definition in block 2 follows the use) at -Ofast with decimals since r7-950-g8a85cee26eabf5cf marxin at gcc dot gnu.org
2022-04-06  9:40 ` rguenth at gcc dot gnu.org [this message]
2022-04-06 11:15 ` cvs-commit at gcc dot gnu.org
2022-04-06 11:16 ` [Bug tree-optimization/105173] [10/11 " rguenth at gcc dot gnu.org
2022-05-19 14:03 ` cvs-commit at gcc dot gnu.org
2022-05-27 13:15 ` [Bug tree-optimization/105173] [10 " cvs-commit at gcc dot gnu.org
2022-05-27 13:17 ` 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-105173-4-QXXx0k8ygU@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).