aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Analysis/double-ranges-bug.c
blob: a73d2ff949eda995db21595823af28b360867649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %clang_analyze_cc1 -verify %s -analyzer-checker=core

// expected-no-diagnostics

typedef unsigned long int A;

extern int fill(A **values, int *nvalues);

void foo(void) {
  A *values;
  int nvalues;
  fill(&values, &nvalues);

  int i = 1;
  double x, y;

  y = values[i - 1];
  x = values[i];

  if (x <= y) {
  }
}