This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR50322] Fix test-case ivopts-lt.c to use int of same size as pointer.
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- Cc: Mike Stump <mrs at gcc dot gnu dot org>, Georg-Johann Lay <avr at gjlay dot de>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 15 Sep 2011 10:20:25 +0200
- Subject: Re: [PATCH, PR50322] Fix test-case ivopts-lt.c to use int of same size as pointer.
- References: <4E709480.8050601@mentor.com> <20110914163526.GA13075@kam.mff.cuni.cz>
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 <tom@codesourcery.com>
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" } } */