gcc/testsuite/c-c++-common/analyzer/call-summaries-asm-x86.c
raw| 1 | /* { dg-do compile { target x86_64-*-* } } */ |
| 2 | /* { dg-additional-options "-fanalyzer-call-summaries --param analyzer-min-snodes-for-call-summary=0" } */ |
| 3 | |
| 4 | #include "analyzer-decls.h" |
| 5 | |
| 6 | int returns_asm_value (void) |
| 7 | { |
| 8 | int dst; |
| 9 | asm ("mov 42, %0" |
| 10 | : "=r" (dst)); |
| 11 | return dst; |
| 12 | } |
| 13 | |
| 14 | void test_returns_asm_value (void) |
| 15 | { |
| 16 | int a, b; |
| 17 | a = returns_asm_value (); |
| 18 | b = returns_asm_value (); |
| 19 | __analyzer_eval (a == b); /* { dg-warning "TRUE" } */ |
| 20 | } |