On 09/14/2011 06:35 PM, Zdenek Dvorak wrote:
> Hi,
>
>> The attached patch fixes PR50322.
>>
>> The test-case is supposed to succeed if the loop counter data-type has the
>> same
>> size as a pointer. The patch defines TYPE to be an int datatype of the same
>> size
>> as a pointer, and uses it. After this fix, there's no need for the avr xfails
>> anymore.
>>
>> tested with avr, x86_64 and x86_64 -m32.
>
> what about using uintptr_t?
>
That's shorter indeed.
Tested with x86_64 and x86_64 -m32. When running on my gcc+binutils avr build,
the test is listed as unsupported because it doesn't contain stdint.h, but I
think that just means that libc is missing in my build setup.
OK for trunk?
> Zdenek
>
2011-09-14 Tom de Vries <[email protected]>
PR testsuite/50322
* gcc.dg/tree-ssa/ivopts-lt.c: require stdint_types. include stdint.h.
Use uintptr_t in f1. Undo avr xfails.
Index: gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c (revision 178804)
+++ gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c (working copy)
@@ -1,8 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-ivopts" } */
+/* { dg-require-effective-target stdint_types } */
+
+#include "stdint.h"
void
-f1 (char *p, unsigned long int i, unsigned long int n)
+f1 (char *p, uintptr_t i, uintptr_t n)
{
p += i;
do
@@ -14,8 +17,7 @@ f1 (char *p, unsigned long int i, unsign
while (i < n);
}
-/* For the fails on avr see PR tree-optimization/50322. */
-/* { dg-final { scan-tree-dump-times "PHI" 1 "ivopts" { xfail { "avr-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "PHI" 1 "ivopts" } } */
/* { dg-final { scan-tree-dump-times "PHI <p_" 1 "ivopts"} } */
-/* { dg-final { scan-tree-dump-times "p_\[0-9\]* <" 1 "ivopts" { xfail { "avr-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "p_\[0-9\]* <" 1 "ivopts" } } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */