1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-details"  } */
3 
4 extern void consume (int);
5 extern int glob, glob1, glob2;
6 extern int get (void);
7 
8 
9 static void __attribute__ ((noinline))
foo(int a)10 foo (int a)
11 {
12   a = glob;
13   consume (a);
14   a = get ();
15   consume (a);
16   __asm__ volatile("" : : ""(a));
17   consume (a);
18 
19   if (glob1)
20     a = glob1;
21   else
22     a = glob2;
23   consume (a);
24 }
25 
26 int
bar(int a)27 bar (int a)
28 {
29   foo (a);
30   glob = a;
31   return 0;
32 }
33 
34 /* { dg-final { scan-tree-dump-times "replacing an SSA name of a removed param" 4 "eipa_sra" } } */
35