Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/abs-1.c

raw
1 #include "analyzer-decls.h"
2
3 extern long int labs (long int x)
4 __attribute__ ((__nothrow__ , __leaf__))
5 __attribute__ ((__const__));
6
7 long int test_1 (long int x)
8 {
9 return labs (x);
10 }
11
12 static long __attribute__((noinline))
13 hide_long (long x)
14 {
15 return x;
16 }
17
18 long int test_2 (long int x)
19 {
20 __analyzer_eval (labs (hide_long (42)) == 42); /* { dg-warning "TRUE" } */
21 __analyzer_eval (labs (hide_long (-17)) == 17); /* { dg-warning "TRUE" } */
22 }