1 /* { dg-do compile } */ 2 /* { dg-options "-O1 -fdump-tree-dom2" } */ 3 4 extern int square (int) __attribute__ ((__const__)); 5 int shit(int a)6shit(int a) 7 { 8 return square (a) + square (a); 9 10 } 11 12 /* There should be precisely one call to square. If there is more than one, 13 then the dominator optimizations failed to remove the redundant call. */ 14 /* { dg-final { scan-tree-dump-times "square" 1 "dom2"} } */ 15