This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make infer_loop_bounds_from_ref handle MEM_REFs, fix PR63278
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>
- Date: Thu, 16 Oct 2014 15:53:55 +0200
- Subject: Re: [PATCH] Make infer_loop_bounds_from_ref handle MEM_REFs, fix PR63278
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1410161540510 dot 20733 at zhemvz dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Oct 16, 2014 at 03:44:50PM +0200, Richard Biener wrote:
> --- gcc/testsuite/gcc.dg/tree-ssa/loop-42.c (revision 0)
> +++ gcc/testsuite/gcc.dg/tree-ssa/loop-42.c (working copy)
> @@ -0,0 +1,19 @@
> +/* { dg-do run } */
> +/* { dg-options "-O2 -fdump-tree-cunroll-details" } */
> +
> +extern void abort (void);
> +int a = -1;
> +int n = sizeof (int);
> +int main()
> +{
> + char *p;
> + int i;
> + for (i = 0, p = (char *)&a; i < n; ++i)
> + *p++ = 0;
> + if (a != 0)
> + abort ();
> + return 0;
> +}
> +
> +/* { dg-final { scan-tree-dump "loop with 4 iterations completely unrolled" "cunroll" } } */
This will fail on all targets where sizeof (int) is not 4 :(.
So, I think you need to guard this scan-tree-dump with { target int32 }.
Jakub