Zdenek Dvorak <ook@ucw.cz>
PR tree-optimization/39233
* tree-ssa-loop-ivopts.c (add_candidate_1): Do not except pointers
from converting them to a generic type.
* gcc.c-torture/execute/pr39233.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144405
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-02-24 Richard Guenther <rguenther@suse.de>
+ Zdenek Dvorak <ook@ucw.cz>
+
+ PR tree-optimization/39233
+ * tree-ssa-loop-ivopts.c (add_candidate_1): Do not except pointers
+ from converting them to a generic type.
+
2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/39260
+2009-02-24 Richard Guenther <rguenther@suse.de>
+ Zdenek Dvorak <ook@ucw.cz>
+
+ PR tree-optimization/39233
+ * gcc.c-torture/execute/pr39233.c: New testcase.
+
2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/39260
--- /dev/null
+extern void abort (void);
+
+__attribute__((noinline)) void
+foo (void *p)
+{
+ long l = (long) p;
+ if (l < 0 || l > 6)
+ abort ();
+}
+
+int
+main ()
+{
+ short i;
+ for (i = 6; i >= 0; i--)
+ foo ((void *) (long) i);
+ return 0;
+}
{
orig_type = TREE_TYPE (base);
type = generic_type_for (orig_type);
- /* Don't convert the base to the generic type for pointers as the generic
- type is an integer type with the same size as the pointer type. */
- if (type != orig_type && !POINTER_TYPE_P (orig_type))
+ if (type != orig_type)
{
base = fold_convert (type, base);
step = fold_convert (type, step);