public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vsevolod.livinskij at frtk dot ru" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/95268] New: ICE: invalid ‘PHI’ argument
Date: Fri, 22 May 2020 06:18:44 +0000	[thread overview]
Message-ID: <bug-95268-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 95268
           Summary: ICE: invalid ‘PHI’ argument
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vsevolod.livinskij at frtk dot ru
  Target Milestone: ---

GCC fails with "invalid ‘PHI’ argument"

Error:
>$ g++ -O3 func.cpp -w
func.cpp: In function ‘void test()’:
func.cpp:10:6: error: invalid ‘PHI’ argument
   10 | void test() {
      |      ^~~~
{CLOBBER}
_98 = PHI <{CLOBBER}(5), _17(7)>
during GIMPLE pass: sink
func.cpp:10:6: internal compiler error: verify_gimple failed
0x113ea11 verify_gimple_in_cfg(function*, bool)
        gcc_src/gcc/tree-cfg.c:5461
0x101204f execute_function_todo
        gcc_src/gcc/passes.c:1985
0x1012e2e execute_todo
        gcc_src/gcc/passes.c:2039

Reproducer:
#include <algorithm>

extern short var_0, var_2, var_3, var_9, var_11, var_13, var_14, var_19,
var_22,
    var_32, var_37, var_44, var_57, var_59, var_63, var_70;
extern unsigned var_5;
extern char var_6, var_12, var_18, var_38, var_39, var_43, var_55, var_64,
    arr_35;
extern long var_7, var_8, var_10, var_15, var_25, var_56;
extern int var_21, var_36, var_51, var_65, var_68, arr_7;
extern bool var_46, var_58, var_67;

void test() {
  var_12 = 0 >= 0;
  var_13 = arr_7;
  var_14 = (unsigned long)var_7 >> -564810131 + 564810189;
  var_15 = var_5;
  var_18 = -602739307623583391;
  var_19 = -~0;
  var_21 = var_10 >> var_8 - 17101301574577641170ULL;
  var_22 = var_5;
  var_25 = var_9;
  var_32 = std::max((unsigned)var_2, var_5);
  var_36 = 9557;
  var_37 = 394545925;
  var_38 = 0 >= 0;
  var_39 = var_5;
  var_43 = 0;
  var_44 = arr_35;
  var_46 = var_7;
  for (short a = 0; a < 9; a = 021)
    for (short b = 0; b < 024; b += 4)
      var_51 = std::min((long long)(var_2 ?: var_9), (long long)var_9);
  var_55 = var_0;
  var_56 = 3896150587;
  var_57 = var_11;
  var_58 = var_59 = var_11;
  var_63 = 73;
  var_64 = 10393232284806619711ULL;
  var_65 = var_3;
  var_67 = var_6;
  var_68 = var_70 = 0;
}

GCC version:
11.0.0 (149c8c7c27a17a2941d07e2f76b1e1c823e2fa80)

             reply	other threads:[~2020-05-22  6:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  6:18 vsevolod.livinskij at frtk dot ru [this message]
2020-05-22  6:58 ` [Bug tree-optimization/95268] " rguenth at gcc dot gnu.org
2020-05-22 11:05 ` cvs-commit at gcc dot gnu.org
2020-05-22 11:26 ` 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-95268-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).