Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/tree-ssa/pr79943.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do run } */ /* { dg-options "-O2 -fsplit-loops -fdump-tree-lsplit-details" } */ /* { dg-require-effective-target int32plus } */ #ifdef __cplusplus extern "C" void abort (void); #else extern void abort (void); #endif typedef struct { int n; } region_t; void set (region_t *region) __attribute__((noinline)); void doit (region_t *beg, region_t *end, region_t *limit) __attribute__((noinline)); region_t regions[10]; void set (region_t *region) { region->n = 1; } void doit (region_t *beg, region_t *end, region_t *limit) { for (region_t *cur = beg; cur < end; cur++) { if (cur < limit) { set(cur); } } } int main (void) { doit(®ions[0], ®ions[2], ®ions[10]); if (regions[1].n != 1) abort(); }