public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/99927] New: [11 Regression] Maybe wrong code since r11-39-gf9e1ea10e657af9f
Date: Tue, 06 Apr 2021 08:22:33 +0000	[thread overview]
Message-ID: <bug-99927-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99927
           Summary: [11 Regression] Maybe wrong code since
                    r11-39-gf9e1ea10e657af9f
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

Reduced from yarpgen:

$ cat func.cpp
short var = 9;

int test_var_1 = 0, test_var_5 = 0, test_var_8 = 0, test_var_10 = 0;

void test(unsigned var_6, unsigned long long var_9) {

  for (; test_var_10;)
    if (test_var_5)
      for (;; test_var_1 += test_var_8)
        ;
  for (int i_10 = 0; i_10 < 23; i_10 += 4)
    for (unsigned int i_11 = 0; i_11 < var_6 + 471511258; i_11 ++)
      if ((var_9 == 0) % var_6)
        var = 0;
}

int main() {
  test(3823456048, 10675217251973);
  __builtin_printf("%u\n", var);
  if (var != 9)
    __builtin_abort ();

  return 0;
}

$ g++ func.cpp && ./a.out
9
$ g++ func.cpp -O3 && ./a.out
0
Aborted (core dumped)

             reply	other threads:[~2021-04-06  8:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  8:22 marxin at gcc dot gnu.org [this message]
2021-04-06  8:54 ` [Bug tree-optimization/99927] " rguenth at gcc dot gnu.org
2021-04-06 13:57 ` jakub at gcc dot gnu.org
2021-04-06 14:02 ` jakub at gcc dot gnu.org
2021-04-06 14:17 ` rguenth at gcc dot gnu.org
2021-04-06 14:44 ` jakub at gcc dot gnu.org
2021-04-06 15:03 ` jakub at gcc dot gnu.org
2021-04-06 15:37 ` jakub at gcc dot gnu.org
2021-04-06 15:42 ` jakub at gcc dot gnu.org
2021-04-06 19:59 ` segher at gcc dot gnu.org
2021-04-06 20:05 ` jakub at gcc dot gnu.org
2021-04-07 17:38 ` [Bug tree-optimization/99927] [11 Regression] Wrong " segher at gcc dot gnu.org
2021-04-07 17:46 ` jakub at gcc dot gnu.org
2021-04-07 18:09 ` segher at gcc dot gnu.org
2021-04-08  2:39 ` segher at gcc dot gnu.org
2021-04-12 14:21 ` rguenth at gcc dot gnu.org
2021-04-12 18:00 ` segher at gcc dot gnu.org
2021-04-18 15:01 ` cvs-commit at gcc dot gnu.org
2021-04-18 15:08 ` [Bug rtl-optimization/99927] " segher at gcc dot gnu.org
2021-04-27 11:40 ` jakub at gcc dot gnu.org
2021-04-29 10:44 ` rguenth at gcc dot gnu.org
2021-07-19 16:07 ` [Bug rtl-optimization/99927] [9/10 only] " pinskia at gcc dot gnu.org
2021-07-19 16:07 ` pinskia at gcc dot gnu.org
2021-07-19 17:13 ` cvs-commit at gcc dot gnu.org
2021-07-19 17:15 ` cvs-commit at gcc dot gnu.org
2021-07-19 17:16 ` segher 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-99927-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).