public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103615] New: [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu
@ 2021-12-08  9:15 siarhei.siamashka at gmail dot com
  2021-12-08  9:17 ` [Bug tree-optimization/103615] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: siarhei.siamashka at gmail dot com @ 2021-12-08  9:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103615
           Summary: [8/9 Regression] wrong code with "-O3" or "-O1
                    -ftree-vectorize" on x86_64-pc-linux-gnu
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: siarhei.siamashka at gmail dot com
  Target Milestone: ---

A reduced testcase from https://codeforces.com/blog/entry/97433

$ cat test.c
int z = 5;
int a[6] = {0, 0, 0, 0, 0, 1};
int main() {
  for (int x = 5; x; x--)
    for (int y = z; y >= x; y--)
      a[y - x] += a[y];
  if (a[0] != 7)
    __builtin_abort ();
  return 0;
}

$ gcc-7.3.0 -O3 test.c && ./a.out

$ gcc-8.3.0 -O3 test.c && ./a.out
Aborted

$ gcc-9.3.0 -O3 test.c && ./a.out
Aborted

$ gcc-9.4.1 -O3 test.c && ./a.out
Aborted

$ gcc-10.3.0 -O3 test.c && ./a.out

Only GCC versions 8.x and 9.x are affected and the bug is triggered by "-O3" or
"-O1 -ftree-vectorize" optimization option.

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

* [Bug tree-optimization/103615] [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu
  2021-12-08  9:15 [Bug tree-optimization/103615] New: [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu siarhei.siamashka at gmail dot com
@ 2021-12-08  9:17 ` pinskia at gcc dot gnu.org
  2021-12-08  9:21 ` [Bug tree-optimization/103615] [9 " marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-08  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.4

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

* [Bug tree-optimization/103615] [9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu
  2021-12-08  9:15 [Bug tree-optimization/103615] New: [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu siarhei.siamashka at gmail dot com
  2021-12-08  9:17 ` [Bug tree-optimization/103615] " pinskia at gcc dot gnu.org
@ 2021-12-08  9:21 ` marxin at gcc dot gnu.org
  2022-01-03  8:57 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-08  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Keywords|needs-bisection             |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-12-08
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org,
                   |                            |rsandifo at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks for the report.
Using -march=core2 started with r8-5008-ga52206ae28ed3e55 and was fixed with
r10-4758-ge9acf80c96d68191.

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

* [Bug tree-optimization/103615] [9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu
  2021-12-08  9:15 [Bug tree-optimization/103615] New: [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu siarhei.siamashka at gmail dot com
  2021-12-08  9:17 ` [Bug tree-optimization/103615] " pinskia at gcc dot gnu.org
  2021-12-08  9:21 ` [Bug tree-optimization/103615] [9 " marxin at gcc dot gnu.org
@ 2022-01-03  8:57 ` cvs-commit at gcc dot gnu.org
  2022-01-03 12:14 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-03  8:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:660e5834667a9efdb4d400dfb83caa48c9dd9f9b

commit r12-6175-g660e5834667a9efdb4d400dfb83caa48c9dd9f9b
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jan 3 09:56:13 2022 +0100

    Add testcase for PR103615

    This adds a testcase for a fixed wrong-code bug.

    2022-01-03  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/103615
            * gcc.dg/torture/pr103615.c: New testcase.

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

* [Bug tree-optimization/103615] [9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu
  2021-12-08  9:15 [Bug tree-optimization/103615] New: [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu siarhei.siamashka at gmail dot com
                   ` (2 preceding siblings ...)
  2022-01-03  8:57 ` cvs-commit at gcc dot gnu.org
@ 2022-01-03 12:14 ` rguenth at gcc dot gnu.org
  2022-01-08 10:55 ` pinskia at gcc dot gnu.org
  2022-05-27  9:52 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-03 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug tree-optimization/103615] [9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu
  2021-12-08  9:15 [Bug tree-optimization/103615] New: [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu siarhei.siamashka at gmail dot com
                   ` (3 preceding siblings ...)
  2022-01-03 12:14 ` rguenth at gcc dot gnu.org
@ 2022-01-08 10:55 ` pinskia at gcc dot gnu.org
  2022-05-27  9:52 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-08 10:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

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

* [Bug tree-optimization/103615] [9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu
  2021-12-08  9:15 [Bug tree-optimization/103615] New: [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu siarhei.siamashka at gmail dot com
                   ` (4 preceding siblings ...)
  2022-01-08 10:55 ` pinskia at gcc dot gnu.org
@ 2022-05-27  9:52 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.0
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 10.

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

end of thread, other threads:[~2022-05-27  9:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08  9:15 [Bug tree-optimization/103615] New: [8/9 Regression] wrong code with "-O3" or "-O1 -ftree-vectorize" on x86_64-pc-linux-gnu siarhei.siamashka at gmail dot com
2021-12-08  9:17 ` [Bug tree-optimization/103615] " pinskia at gcc dot gnu.org
2021-12-08  9:21 ` [Bug tree-optimization/103615] [9 " marxin at gcc dot gnu.org
2022-01-03  8:57 ` cvs-commit at gcc dot gnu.org
2022-01-03 12:14 ` rguenth at gcc dot gnu.org
2022-01-08 10:55 ` pinskia at gcc dot gnu.org
2022-05-27  9:52 ` rguenth 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).