comparison gcc/testsuite/gcc.dg/guality/pr54200.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR tree-optimization/54200 */
2 /* { dg-do run } */
3 /* { dg-options "-g -fno-var-tracking-assignments -fno-tree-coalesce-vars" } */
4
5 int o __attribute__((used));
6
7 void bar (void) { o = 2; }
8
9 int __attribute__((noinline,noclone))
10 foo (int z, int x, int b)
11 {
12 if (x == 1)
13 {
14 bar ();
15 return z;
16 }
17 else
18 {
19 int a = (x + z) + b;
20 return a; /* { dg-final { gdb-test 20 "z" "3" } } */
21 }
22 }
23
24 int main ()
25 {
26 foo (3, 2, 1);
27 return 0;
28 }