Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/pr38789.c

raw
1 /* PR tree-optimization/38789 */
2 /* { dg-do compile } */
3
4 void
5 baz (int v)
6 {
7 unsigned a = (v == 1) ? 1 : 2;
8
9 if (__builtin_constant_p (a))
10 asm volatile ("# constant %0" :: "i" (a));
11 else
12 asm volatile ("# register %0" :: "r" (a));
13
14 a = 6;
15 if (__builtin_constant_p (a))
16 asm volatile ("# constant %0" :: "i" (a));
17 else
18 asm volatile ("# register %0" :: "r" (a));
19 }