1 /* { dg-do run } */ 2 /* { dg-options "-O2 -fno-tree-fre" } */ 3 4 int __attribute__((noipa)) foo(int flag,int * p)5foo (int flag, int *p) 6 { 7 int val = *p; 8 if (flag) 9 { 10 if (val != 1) 11 __builtin_unreachable (); 12 return 0; 13 } 14 int val2 = *p; 15 return val2 == 2; 16 } 17 main()18int main() 19 { 20 int i = 2; 21 if (foo (0, &i) != 1) 22 __builtin_abort (); 23 return 0; 24 } 25