1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-pre" } */ long NumSift (long *array, unsigned long k) { if (array[k] < array[k + 1L]) ++k; return array[k]; } /* There should be only two loads left. */ /* { dg-final { scan-tree-dump-times "= \\\*D\[^\n;\]*;" 2 "pre" } } */ /* { dg-final { cleanup-tree-dump "pre" } } */