1 /* { dg-do compile } */
2 /* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-details" } */
6 float *foo(int ustride
, int size
, float *src
)
14 buffer
= (float *) malloc(N
* size
* sizeof(float));
17 for(i
=0, p
=buffer
; i
<N
; i
++, src
+=ustride
)
24 /* { dg-final { scan-tree-dump-times "guard hoisted" 1 "unswitch" } } */
25 /* { dg-final { scan-tree-dump-not "Invalid sum" "unswitch" } } */