2012-11-28 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Nov 2012 09:27:10 +0000 (09:27 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Nov 2012 09:27:10 +0000 (09:27 +0000)
commitb4c4a429ea30a6aeea8ded8eb1d78bf1b94b096c
tree708df4dc743c4f6d7778396707a8a1254049b1dd
parentef723edc44deec25ab1711c73d4ae805fdb67b22
2012-11-28  Richard Biener  <rguenther@suse.de>

PR c/35634
* gimple.h (gimplify_self_mod_expr): Declare.
* gimplify.c (gimplify_self_mod_expr): Export.  Take a different
type for performing the arithmetic in.
(gimplify_expr): Adjust.
* tree-vect-loop-manip.c (vect_can_advance_ivs_p): Strip
sign conversions we can re-apply after adjusting the IV.

c-family/
* c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
here and use a type with proper overflow behavior for types that would
need to be promoted for the arithmetic.

* gcc.dg/torture/pr35634.c: New testcase.
* g++.dg/torture/pr35634.C: Likewise.
* gcc.dg/vect/pr18536.c: Mark worker function noinline.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193882 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-gimplify.c
gcc/gimple.h
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr35634.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr35634.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr18536.c
gcc/tree-vect-loop-manip.c