(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
ssa-fre-81.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-tree-fre1-details" } */
       3  
       4  struct a
       5  {
       6    int foo,bar;
       7  };
       8  struct b
       9  {
      10    struct a a[10];
      11  };
      12  struct b b, *bptr=&b, *bptr2=&b;
      13  int j;
      14  int i;
      15  int n=1;
      16  
      17  int
      18  main ()
      19  {
      20    int jj=j;
      21    bptr2->a[jj].bar = 0;
      22    for (int i=0; i<n; i++)
      23      bptr->a[i].foo=1;
      24    if (!__builtin_constant_p (bptr2->a[jj].bar == 0))
      25      __builtin_abort ();
      26    return 0;
      27  }
      28  
      29  /* { dg-final { scan-tree-dump "Replaced __builtin_constant_p \\\(\[^)\]*\\\) with 1" "fre1" } } */