1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
static inline int is_const(long size) { return __builtin_constant_p(size) ? size : 0; } int foo(void) { return is_const(42); } /* * check-name: builtin_constant_inline0 * check-command: test-linearize -Wno-decl $file * * check-output-start foo: .L0: <entry-point> ret.32 $42 * check-output-end */