(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
ipa/
ipa-pta-4.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O2 -fipa-pta -fdump-ipa-pta2-details -fdump-tree-fre3-details" } */
       3  
       4  int a, b;
       5  
       6  static int __attribute__((noinline,noclone))
       7  foo (int *p, int *q)
       8  {
       9    int res;
      10    *p = 1;
      11    *q = 0;
      12    res = *p;
      13    a = 1;
      14    b = 1;
      15    return res;
      16  }
      17  
      18  extern void abort (void);
      19  
      20  int main()
      21  {
      22    if (foo (&a, &b) != 1)
      23      abort ();
      24    return 0;
      25  }
      26  
      27  /* Verify we can disambiguate *p and *q in foo.  */
      28  
      29  /* { dg-final { scan-ipa-dump "foo.arg0 = &a" "pta2" } } */
      30  /* { dg-final { scan-ipa-dump "foo.arg1 = &b" "pta2" } } */
      31  /* { dg-final { scan-tree-dump "Replaced \\\*p_2\\\(D\\\) with 1" "fre3" } } */