[Bug tree-optimization/39736] signed overflow in loop induction variable: missing warning and wrong code

2009-04-13 Thread edwintorok at gmail dot com
--- Comment #5 from edwintorok at gmail dot com 2009-04-13 06:56 --- (In reply to comment #4) (In reply to comment #3) But converting from short to int for the argument to printf should behave as if a short value was converted to int, i.e. the int value should be in range

[Bug tree-optimization/39736] signed overflow in loop induction variable: missing warning and wrong code

2009-04-13 Thread schwab at linux-m68k dot org
--- Comment #6 from schwab at linux-m68k dot org 2009-04-13 07:53 --- (In reply to comment #4) But your test program does cause signed overflow No, it doesn't. There is a conversion (from int to short) where the value is not representable by the target type, but that is _not_

[Bug tree-optimization/39736] signed overflow in loop induction variable: missing warning and wrong code

2009-04-13 Thread rguenth at gcc dot gnu dot org
--- Comment #7 from rguenth at gcc dot gnu dot org 2009-04-13 08:19 --- *** This bug has been marked as a duplicate of 35634 *** -- rguenth at gcc dot gnu dot org changed: What|Removed |Added

[Bug tree-optimization/39736] signed overflow in loop induction variable: missing warning and wrong code

2009-04-12 Thread mikpe at it dot uu dot se
--- Comment #2 from mikpe at it dot uu dot se 2009-04-12 09:11 --- (In reply to comment #1) There is no undefined behavior here (increment of a short value converts to int, increments then converts back to short, none of which are undefined), so at least the wrong code issue would

[Bug tree-optimization/39736] signed overflow in loop induction variable: missing warning and wrong code

2009-04-12 Thread edwintorok at gmail dot com
--- Comment #3 from edwintorok at gmail dot com 2009-04-12 09:32 --- (In reply to comment #2) (In reply to comment #1) There is no undefined behavior here (increment of a short value converts to int, increments then converts back to short, none of which are undefined), so at

[Bug tree-optimization/39736] signed overflow in loop induction variable: missing warning and wrong code

2009-04-12 Thread mikpe at it dot uu dot se
--- Comment #4 from mikpe at it dot uu dot se 2009-04-12 21:33 --- (In reply to comment #3) (In reply to comment #2) (In reply to comment #1) There is no undefined behavior here (increment of a short value converts to int, increments then converts back to short, none of which

[Bug tree-optimization/39736] signed overflow in loop induction variable: missing warning and wrong code

2009-04-11 Thread joseph at codesourcery dot com
--- Comment #1 from joseph at codesourcery dot com 2009-04-11 12:51 --- Subject: Re: New: signed overflow in loop induction variable: missing warning and wrong code On Sat, 11 Apr 2009, edwintorok at gmail dot com wrote: Testcase: #include stdio.h int main () { int