(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
ipa/
ipa-icf-38.c
       1  /* { dg-do link } */
       2  /* { dg-options "-O2 -fdump-ipa-icf-optimized -flto -fdump-tree-optimized" } */
       3  /* { dg-require-effective-target lto } */
       4  /* { dg-additional-sources "ipa-icf-38a.c" }*/
       5  
       6  /* Based on ipa-icf-3.c.  */
       7  
       8  typedef int v4si __attribute__ ((vector_size (16)));
       9  
      10  __attribute__ ((noinline))
      11  int foo(void)
      12  {
      13    v4si a = {1,2,3,4};
      14    v4si b = {3,2,1,4};
      15    v4si c;
      16  
      17    return 54;
      18  }
      19  
      20  extern int bar(void);
      21  
      22  int main()
      23  {
      24    int volatile a = foo();
      25    int volatile b = bar();
      26  
      27    return 0;
      28  }
      29  
      30  /* { dg-final { scan-wpa-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf"  } } */
      31  /* { dg-final { scan-wpa-ipa-dump "Equal symbols: 1" "icf"  } } */
      32  /* { dg-final { scan-ltrans-tree-dump "Function foo" "optimized" } } */
      33  /* { dg-final { scan-ltrans-tree-dump-not "Function bar" "optimized" } } */