[Bug middle-end/80100] simplify-rtx.c sanitizer detects undefined behaviour with optimization

2017-04-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80100

--- Comment #8 from Jakub Jelinek  ---
(In reply to Vittorio Zecca from comment #7)
> Looking at the diff file, where is the change in line 2744? 
> "int count = INTVAL (XEXP (op0, 1));"
> 
> Old and new look the same to me.

Whitespace fix, spaces to tab.

[Bug middle-end/80100] simplify-rtx.c sanitizer detects undefined behaviour with optimization

2017-04-12 Thread zeccav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80100

--- Comment #7 from Vittorio Zecca  ---
(In reply to Jakub Jelinek from comment #5)
> Author: jakub
> Date: Tue Apr 11 17:21:51 2017
> New Revision: 246851
> 
> URL: https://gcc.gnu.org/viewcvs?rev=246851=gcc=rev
> Log:
>   PR middle-end/80100
>   * simplify-rtx.c (simplify_binary_operation_1) : Perform
>   left shift in unsigned HOST_WIDE_INT type.
> 
>   * gcc.dg/pr80100.c: New test.
> 
> Added:
> trunk/gcc/testsuite/gcc.dg/pr80100.c
> Modified:
> trunk/gcc/ChangeLog
> trunk/gcc/simplify-rtx.c
> trunk/gcc/testsuite/ChangeLog

Looking at the diff file, where is the change in line 2744? 
"int count = INTVAL (XEXP (op0, 1));"

Old and new look the same to me.

[Bug middle-end/80100] simplify-rtx.c sanitizer detects undefined behaviour with optimization

2017-04-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80100

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jakub Jelinek  ---
Fixed.

[Bug middle-end/80100] simplify-rtx.c sanitizer detects undefined behaviour with optimization

2017-04-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80100

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 11 17:21:51 2017
New Revision: 246851

URL: https://gcc.gnu.org/viewcvs?rev=246851=gcc=rev
Log:
PR middle-end/80100
* simplify-rtx.c (simplify_binary_operation_1) : Perform
left shift in unsigned HOST_WIDE_INT type.

* gcc.dg/pr80100.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr80100.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/simplify-rtx.c
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/80100] simplify-rtx.c sanitizer detects undefined behaviour with optimization

2017-04-11 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80100

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
Created attachment 41177
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41177=edit
gcc7-pr80100.patch

Untested fix.

[Bug middle-end/80100] simplify-rtx.c sanitizer detects undefined behaviour with optimization

2017-04-11 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80100

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-04-11
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Martin Liška  ---
Confirmed.

[Bug middle-end/80100] simplify-rtx.c sanitizer detects undefined behaviour with optimization

2017-04-10 Thread zeccav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80100

--- Comment #2 from Vittorio Zecca  ---
simplify-rtx.c:2743 is "HOST_WIDE_INT mask = INTVAL (trueop1) << count;"

[Bug middle-end/80100] simplify-rtx.c sanitizer detects undefined behaviour with optimization

2017-04-06 Thread zeccav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80100

--- Comment #1 from Vittorio Zecca  ---
Still in trunk 246751.