public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto
@ 2020-11-12 12:19 qiaopeixin at huawei dot com
  2020-11-12 12:23 ` [Bug lto/97812] " jakub at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: qiaopeixin at huawei dot com @ 2020-11-12 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97812
           Summary: Wrong output when compiling the testcase with -O2
                    -flto
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: qiaopeixin at huawei dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Hi, gcc-trunk outputs wrong result when compiling the following testcase with
-O2 -flto:

#include<stdio.h>
short a;
volatile short b = 4066;
char c;
int main() {
  unsigned d = b & 2305;
  signed char e = d;
  c = e ? : e;
  if (d) {
    printf("%d\n", a);
  }
}

$gcc -O0 -w test.c && ./a.out
0

$gcc -O2 -flto -w test.c && ./a.out
(nothing)

gcc version 11.0.0 20201111 (experimental) (GCC)

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

* [Bug lto/97812] Wrong output when compiling the testcase with -O2 -flto
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
@ 2020-11-12 12:23 ` jakub at gcc dot gnu.org
  2020-11-12 12:24 ` marxin at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-12 12:23 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On which target?  Can't reproduce on x86_64-linux.

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

* [Bug lto/97812] Wrong output when compiling the testcase with -O2 -flto
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
  2020-11-12 12:23 ` [Bug lto/97812] " jakub at gcc dot gnu.org
@ 2020-11-12 12:24 ` marxin at gcc dot gnu.org
  2020-11-12 13:12 ` qiaopeixin at huawei dot com
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-12 12:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Which git revision of GCC 11 do you use?

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

* [Bug lto/97812] Wrong output when compiling the testcase with -O2 -flto
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
  2020-11-12 12:23 ` [Bug lto/97812] " jakub at gcc dot gnu.org
  2020-11-12 12:24 ` marxin at gcc dot gnu.org
@ 2020-11-12 13:12 ` qiaopeixin at huawei dot com
  2020-11-12 13:16 ` qiaopeixin at huawei dot com
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: qiaopeixin at huawei dot com @ 2020-11-12 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from qiaopeixin at huawei dot com ---
(In reply to Jakub Jelinek from comment #1)
> On which target?  Can't reproduce on x86_64-linux.

aarch64

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

* [Bug lto/97812] Wrong output when compiling the testcase with -O2 -flto
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (2 preceding siblings ...)
  2020-11-12 13:12 ` qiaopeixin at huawei dot com
@ 2020-11-12 13:16 ` qiaopeixin at huawei dot com
  2020-11-12 13:24 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: qiaopeixin at huawei dot com @ 2020-11-12 13:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from qiaopeixin at huawei dot com ---
(In reply to Martin Liška from comment #2)
> Which git revision of GCC 11 do you use?

Test it using GCC 11 with commit id 3c3beb1a8137460bc485f9fbe3be8b21ee7f91a2
just now and it also fails. It works using GCC 7.3.0 or 8.4.0, and it fails
using GCC 9.3.0, GCC 10.1.0 or current GCC trunk.

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

* [Bug lto/97812] Wrong output when compiling the testcase with -O2 -flto
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (3 preceding siblings ...)
  2020-11-12 13:16 ` qiaopeixin at huawei dot com
@ 2020-11-12 13:24 ` jakub at gcc dot gnu.org
  2020-11-12 13:35 ` marxin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-12 13:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Can you link with -O2 -flto -save-temps -fdump-tree-optimized
and attach your optimized dumps, such that we can find out if it is a problem
during gimple or some target specific bug?

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

* [Bug lto/97812] Wrong output when compiling the testcase with -O2 -flto
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (4 preceding siblings ...)
  2020-11-12 13:24 ` jakub at gcc dot gnu.org
@ 2020-11-12 13:35 ` marxin at gcc dot gnu.org
  2020-11-12 13:55 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-12 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2020-11-12
     Ever confirmed|0                           |1

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
I can reproduce that, working on that.

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

* [Bug lto/97812] Wrong output when compiling the testcase with -O2 -flto
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (5 preceding siblings ...)
  2020-11-12 13:35 ` marxin at gcc dot gnu.org
@ 2020-11-12 13:55 ` marxin at gcc dot gnu.org
  2020-11-13  8:53 ` [Bug lto/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262 marxin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-12 13:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Started in between GCC 8 and GCC 9, bisecting now.

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

* [Bug lto/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (6 preceding siblings ...)
  2020-11-12 13:55 ` marxin at gcc dot gnu.org
@ 2020-11-13  8:53 ` marxin at gcc dot gnu.org
  2020-11-13 10:15 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-13  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Wrong output when compiling |[9/10/11 Regression] Wrong
                   |the testcase with -O2 -flto |output when compiling the
                   |                            |testcase with -O2 -flto
                   |                            |since
                   |                            |r9-4558-g476a31b55b5471262
           Keywords|needs-bisection             |
   Target Milestone|---                         |9.4
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r9-4558-g476a31b55b5471262.

Slightly modified test-case:

$ cat pr97812.c
char c;

int main() {
volatile short b = 4066;
  unsigned d = b & 2305;
  signed char e = d;
  c = e ? : e;
  if (!d)
    __builtin_abort ();
  return 0;
}

@Richi: You can reproduce that on needle machine (su mliska):
$ cd /tmp/
$ gcc pr97812.c -O2 -flto -fdump-tree-all -o a.out && ./a.out
Aborted (core dumped)

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

* [Bug lto/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (7 preceding siblings ...)
  2020-11-13  8:53 ` [Bug lto/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262 marxin at gcc dot gnu.org
@ 2020-11-13 10:15 ` rguenth at gcc dot gnu.org
  2020-11-13 10:27 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-13 10:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #8)
> Started with r9-4558-g476a31b55b5471262.
> 
> Slightly modified test-case:
> 
> $ cat pr97812.c
> char c;
> 
> int main() {
> volatile short b = 4066;
>   unsigned d = b & 2305;
>   signed char e = d;
>   c = e ? : e;
>   if (!d)
>     __builtin_abort ();
>   return 0;
> }
> 
> @Richi: You can reproduce that on needle machine (su mliska):
> $ cd /tmp/
> $ gcc pr97812.c -O2 -flto -fdump-tree-all -o a.out && ./a.out
> Aborted (core dumped)

Why would you need -flto?  Can you share dumps of the previous pass
of where it goes wrong?  I also fail to see why it would need aarch64,
there's no piece that should influence GIMPLE.

Hmm, OK.  So a cross shows differences in the initial IL from the FE:

   volatile short int b = 4066;
-  unsigned int d = (unsigned int) b & 2305;
+  unsigned int d = (unsigned int) (unsigned short) b & 2305;
   signed char e = (signed char) d;

the GIMPLE dump reveals association:

-    _2 = (unsigned int) b.0_1;
-    d = _2 & 2305;
+    b.1_2 = (unsigned short) b.0_1;
+    _3 = (unsigned int) b.1_2;
+    d = _3 & 2305;

for some reason on aarch64 we are zero-extending b only on aarch64.
>From here things go downhill.

Ah, the difference stems from fold_unary which does

      /* Convert (T)(x & c) into (T)x & (T)c, if c is an integer
         constants (if x has signed type, the sign bit cannot be set
         in c).  This folds extension into the BIT_AND_EXPR.
         ??? We don't do it for BOOLEAN_TYPE or ENUMERAL_TYPE because they
         very likely don't have maximal range for their precision and this
         transformation effectively doesn't preserve non-maximal ranges.  */
      if (TREE_CODE (type) == INTEGER_TYPE
          && TREE_CODE (op0) == BIT_AND_EXPR
          && TREE_CODE (TREE_OPERAND (op0, 1)) == INTEGER_CST)
        {
..
              if (change
                  && !flag_syntax_only
                  && (load_extend_op (TYPE_MODE (TREE_TYPE (and0)))
                      == ZERO_EXTEND))
                {
                  tree uns = unsigned_type_for (TREE_TYPE (and0));
                  and0 = fold_convert_loc (loc, uns, and0);
                  and1 = fold_convert_loc (loc, uns, and1);

on x86_64 load_extend_op (HImode) returns UNKNOWN while on aarch64 it
returns ZERO_EXTEND.

Not sure why we do this kind of thing so prematurely here :/

Then one needs -funsigned-char to reproduce it on x86_64 but indeed only with
-flto ...

So, testcase failing on x86_64 with -O2 -flto:

unsigned char c;
int main()
{
  volatile short b = 4066;
  unsigned short bp = b;
  unsigned d = bp & 2305;
  signed char e = d;
  c = e ? : e;
  if (!d)
    __builtin_abort ();
  return 0;
}

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

* [Bug lto/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (8 preceding siblings ...)
  2020-11-13 10:15 ` rguenth at gcc dot gnu.org
@ 2020-11-13 10:27 ` rguenth at gcc dot gnu.org
  2020-11-13 10:38 ` [Bug tree-optimization/97812] " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-13 10:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|marxin at gcc dot gnu.org          |rguenth at gcc dot gnu.org

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, and the reason is that wi::fits_to_tree_p interprets USHORT_MAX as signed
-1
(wide_int is canonically sign-extended) and that fits signed char.  I guess
fits_to_tree_p was supposed to be used on widest_ints only.

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

* [Bug tree-optimization/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (9 preceding siblings ...)
  2020-11-13 10:27 ` rguenth at gcc dot gnu.org
@ 2020-11-13 10:38 ` rguenth at gcc dot gnu.org
  2020-11-13 11:25 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-13 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|lto                         |
          Component|lto                         |tree-optimization
           Priority|P3                          |P2

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
With -fdisable-tree-evrp it also doesn't need -flto.  testing patch.

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

* [Bug tree-optimization/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (10 preceding siblings ...)
  2020-11-13 10:38 ` [Bug tree-optimization/97812] " rguenth at gcc dot gnu.org
@ 2020-11-13 11:25 ` cvs-commit at gcc dot gnu.org
  2020-11-13 11:25 ` [Bug tree-optimization/97812] [9/10 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-13 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 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:dcfd302a79a5e2ea3bb16fc4fc45a5ee31cc0eab

commit r11-4976-gdcfd302a79a5e2ea3bb16fc4fc45a5ee31cc0eab
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Nov 13 11:31:22 2020 +0100

    tree-optimization/97812 - fix range query in VRP assert discovery

    This makes sure to properly extend the input range before seeing
    whether it fits the target.

    2020-11-13  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/97812
            * tree-vrp.c (register_edge_assert_for_2): Extend the range
            according to its sign before seeing whether it fits.

            * gcc.dg/torture/pr97812.c: New testcase.

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

* [Bug tree-optimization/97812] [9/10 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (11 preceding siblings ...)
  2020-11-13 11:25 ` cvs-commit at gcc dot gnu.org
@ 2020-11-13 11:25 ` rguenth at gcc dot gnu.org
  2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-13 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.2.0
      Known to work|                            |11.0
            Summary|[9/10/11 Regression] Wrong  |[9/10 Regression] Wrong
                   |output when compiling the   |output when compiling the
                   |testcase with -O2 -flto     |testcase with -O2 -flto
                   |since                       |since
                   |r9-4558-g476a31b55b5471262  |r9-4558-g476a31b55b5471262

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.

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

* [Bug tree-optimization/97812] [9/10 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (12 preceding siblings ...)
  2020-11-13 11:25 ` [Bug tree-optimization/97812] [9/10 " rguenth at gcc dot gnu.org
@ 2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org
  2020-12-02 12:21 ` [Bug tree-optimization/97812] [9 " cvs-commit at gcc dot gnu.org
  2020-12-02 12:27 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-01 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:041451586908fc1d76f45f5043c88f7b0ccb401b

commit r10-9103-g041451586908fc1d76f45f5043c88f7b0ccb401b
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Nov 13 11:31:22 2020 +0100

    tree-optimization/97812 - fix range query in VRP assert discovery

    This makes sure to properly extend the input range before seeing
    whether it fits the target.

    2020-11-13  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/97812
            * tree-vrp.c (register_edge_assert_for_2): Extend the range
            according to its sign before seeing whether it fits.

            * gcc.dg/torture/pr97812.c: New testcase.

    (cherry picked from commit dcfd302a79a5e2ea3bb16fc4fc45a5ee31cc0eab)

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

* [Bug tree-optimization/97812] [9 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (13 preceding siblings ...)
  2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org
@ 2020-12-02 12:21 ` cvs-commit at gcc dot gnu.org
  2020-12-02 12:27 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-02 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:165ae61a9f7e484cd9cc1ad09f477ecad59c77e9

commit r9-9092-g165ae61a9f7e484cd9cc1ad09f477ecad59c77e9
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Nov 13 11:31:22 2020 +0100

    tree-optimization/97812 - fix range query in VRP assert discovery

    This makes sure to properly extend the input range before seeing
    whether it fits the target.

    2020-11-13  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/97812
            * tree-vrp.c (register_edge_assert_for_2): Extend the range
            according to its sign before seeing whether it fits.

            * gcc.dg/torture/pr97812.c: New testcase.

    (cherry picked from commit dcfd302a79a5e2ea3bb16fc4fc45a5ee31cc0eab)

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

* [Bug tree-optimization/97812] [9 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262
  2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
                   ` (14 preceding siblings ...)
  2020-12-02 12:21 ` [Bug tree-optimization/97812] [9 " cvs-commit at gcc dot gnu.org
@ 2020-12-02 12:27 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-02 12:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Known to work|                            |9.3.1
             Status|ASSIGNED                    |RESOLVED

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-12-02 12:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 12:19 [Bug lto/97812] New: Wrong output when compiling the testcase with -O2 -flto qiaopeixin at huawei dot com
2020-11-12 12:23 ` [Bug lto/97812] " jakub at gcc dot gnu.org
2020-11-12 12:24 ` marxin at gcc dot gnu.org
2020-11-12 13:12 ` qiaopeixin at huawei dot com
2020-11-12 13:16 ` qiaopeixin at huawei dot com
2020-11-12 13:24 ` jakub at gcc dot gnu.org
2020-11-12 13:35 ` marxin at gcc dot gnu.org
2020-11-12 13:55 ` marxin at gcc dot gnu.org
2020-11-13  8:53 ` [Bug lto/97812] [9/10/11 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262 marxin at gcc dot gnu.org
2020-11-13 10:15 ` rguenth at gcc dot gnu.org
2020-11-13 10:27 ` rguenth at gcc dot gnu.org
2020-11-13 10:38 ` [Bug tree-optimization/97812] " rguenth at gcc dot gnu.org
2020-11-13 11:25 ` cvs-commit at gcc dot gnu.org
2020-11-13 11:25 ` [Bug tree-optimization/97812] [9/10 " rguenth at gcc dot gnu.org
2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org
2020-12-02 12:21 ` [Bug tree-optimization/97812] [9 " cvs-commit at gcc dot gnu.org
2020-12-02 12:27 ` 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).