public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/99927] New: [11 Regression] Maybe wrong code since r11-39-gf9e1ea10e657af9f
@ 2021-04-06  8:22 marxin at gcc dot gnu.org
  2021-04-06  8:54 ` [Bug tree-optimization/99927] " rguenth at gcc dot gnu.org
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-06  8:22 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-07-19 17:16 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06  8:22 [Bug tree-optimization/99927] New: [11 Regression] Maybe wrong code since r11-39-gf9e1ea10e657af9f marxin at gcc dot gnu.org
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

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).