aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/call-summaries-asm-x86.c
blob: cc23283f0f8df3fa383ee4cd8c3ca31ca8a6a53e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile { target x86_64-*-* } } */
/* { dg-additional-options "-fanalyzer-call-summaries --param analyzer-min-snodes-for-call-summary=0" } */

#include "analyzer-decls.h"

int returns_asm_value (void)
{
  int dst;
  asm ("mov 42, %0"
       : "=r" (dst));
  return dst;
}

void test_returns_asm_value (void)
{
  int a, b;
  a = returns_asm_value ();
  b = returns_asm_value ();
  __analyzer_eval (a == b); /* { dg-warning "TRUE" } */
}