[Bug tree-optimization/80497] ICE at -O1 and above on valid code on x86_64-linux-gnu in "tree_to_uhwi"

2017-04-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80497

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
  Known to fail|7.0.1, 8.0  |

--- Comment #5 from Martin Sebor  ---
Fixed on trunk (8.0) and 7.1.

[Bug tree-optimization/80497] ICE at -O1 and above on valid code on x86_64-linux-gnu in "tree_to_uhwi"

2017-04-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80497

--- Comment #4 from Martin Sebor  ---
Author: msebor
Date: Tue Apr 25 17:58:32 2017
New Revision: 247264

URL: https://gcc.gnu.org/viewcvs?rev=247264=gcc=rev
Log:
PR tree-optimization/80497 - ICE at -O1 and above on valid code on
x86_64-linux-gnu in tree_to_uhwi

gcc/ChangeLog:

PR tree-optimization/80497
* gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
constants are representable in HOST_WIDE_INT.
(parse_directive): Ditto.

gcc/testsuite/ChangeLog:

PR tree-optimization/80497
* gcc.dg/tree-ssa/builtin-sprintf-warn-17.c: New test.


Added:
   
branches/gcc-7-branch/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-17.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/gimple-ssa-sprintf.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/80497] ICE at -O1 and above on valid code on x86_64-linux-gnu in "tree_to_uhwi"

2017-04-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80497

--- Comment #3 from Martin Sebor  ---
Author: msebor
Date: Tue Apr 25 17:40:58 2017
New Revision: 247262

URL: https://gcc.gnu.org/viewcvs?rev=247262=gcc=rev
Log:
PR tree-optimization/80497 - ICE at -O1 and above on valid code on
x86_64-linux-gnu in tree_to_uhwi

gcc/ChangeLog:

PR tree-optimization/80497
* gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
constants are representable in HOST_WIDE_INT.
(parse_directive): Ditto.

gcc/testsuite/ChangeLog:

PR tree-optimization/80497
* gcc.dg/tree-ssa/builtin-sprintf-warn-17.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-17.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-sprintf.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/80497] ICE at -O1 and above on valid code on x86_64-linux-gnu in "tree_to_uhwi"

2017-04-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80497

Martin Sebor  changed:

   What|Removed |Added

   Keywords|ice-on-valid-code   |ice-on-invalid-code
 Status|NEW |ASSIGNED

--- Comment #2 from Martin Sebor  ---
The test case is invalid (a width specified by the asterisk must be have type
int).  The pass isn't prepared for __int128_t arguments anywhere.

[Bug tree-optimization/80497] ICE at -O1 and above on valid code on x86_64-linux-gnu in "tree_to_uhwi"

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

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Known to work||6.3.0
   Keywords||ice-on-valid-code
   Last reconfirmed||2017-04-24
 CC||marxin at gcc dot gnu.org,
   ||msebor at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|gcc ICE at -O1 and above on |ICE at -O1 and above on
   |valid code on   |valid code on
   |x86_64-linux-gnu in |x86_64-linux-gnu in
   |"tree_to_uhwi"  |"tree_to_uhwi"
  Known to fail||7.0.1, 8.0

--- Comment #1 from Martin Liška  ---
Confirmed, started when -fprintf-return-value was enabled by default (r242674).