blob: df498ce5e6224491cd0a3456ab0bd22997cd33b4 [file] [log] [blame]
Argyrios Kyrtzidis65d39252011-02-24 21:43:08 +00001// RUN: %clang_cc1 -analyze -analyzer-checker=core.experimental -std=gnu99 -analyzer-check-objc-mem -analyzer-store=region -verify %s
Zhongxing Xu5c86b192009-04-29 09:24:35 +00002
3
4// The store for 'a[1]' should not be removed mistakenly. SymbolicRegions may
5// also be live roots.
6void f14(int *a) {
7 int i;
8 a[1] = 1;
9 i = a[1];
10 if (i != 1) {
11 int *p = 0;
12 i = *p; // no-warning
13 }
14}