diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-14 09:24:02 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-14 09:24:02 +0000 |
| commit | 7ef7bab7e3d06f660b059b903c231f100bb13cc5 (patch) | |
| tree | d472a7615b5c7e413aa62a77d0777c1a9cf76478 /test/Analysis | |
| parent | 8ba99c00327a4394e7568244d6cffd6e62625a7a (diff) | |
Notes
Diffstat (limited to 'test/Analysis')
| -rw-r--r-- | test/Analysis/array-struct.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c index c0e1d8b7e39f..0ad7ae7e8283 100644 --- a/test/Analysis/array-struct.c +++ b/test/Analysis/array-struct.c @@ -148,3 +148,13 @@ void f15() { if (a[1]) // no-warning 1; } + +struct s3 p[1]; + +// Code from postgresql. +// Current cast logic of region store mistakenly leaves the final result region +// an ElementRegion of type 'char'. Then load a nonloc::SymbolVal from it and +// assigns to 'a'. +void f16(struct s3 *p) { + struct s3 a = *((struct s3*) ((char*) &p[0])); +} |
