Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / guality / pr54796.c
1 /* PR debug/54796 */
2 /* { dg-do run } */
3 /* { dg-options "-g" } */
4
5 __attribute__((noinline, noclone)) void
6 bar (char *a, int b)
7 {
8   __asm volatile ("" : "+r" (a), "+r" (b) : : "memory");
9 }
10
11 __attribute__((noinline, noclone)) void
12 foo (int a, int b)
13 {
14   int c = a;
15   char d[b];    /* { dg-final { gdb-test 17 "a" "5" } } */
16   bar (d, 2);   /* { dg-final { gdb-test 17 "b" "6" } } */
17   bar (d, 4);   /* { dg-final { gdb-test 17 "c" "5" } } */
18 }
19
20 int
21 main ()
22 {
23   foo (5, 6);
24   return 0;
25 }