(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
ipa/
ipa-icf-39.c
       1  /* { dg-do compile } */
       2  /* { dg-require-alias "" } */
       3  /* { dg-options "-O2 -fdump-ipa-icf-optimized -fmerge-all-constants -fdbg-cnt=merged_ipa_icf:1-2"  } */
       4  /* { dg-prune-output "\\*\\*\\*dbgcnt:.*limit.*reached" } */
       5  
       6  static int a;
       7  static int b;
       8  static const int c = 2;
       9  static const int d = 2;
      10  static char * e = "test";
      11  static char * f = "test";
      12  static int g[3]={1,2,3};
      13  static int h[3]={1,2,3};
      14  static const int *i=&c;
      15  static const int *j=&c;
      16  static const int *k=&d;
      17  int t(int tt)
      18  {
      19    switch (tt)
      20    {
      21      case 1: return a;
      22      case 2: return b;
      23      case 3: return c;
      24      case 4: return d;
      25      case 5: return e[1];
      26      case 6: return f[1];
      27      case 7: return g[1];
      28      case 8: return h[1];
      29      case 9: return i[0];
      30      case 10: return j[0];
      31      case 11: return k[0];
      32    }
      33  }
      34  /* { dg-final { scan-ipa-dump-times "Unified;" 2 "icf"  } } */