Add a test for issue 305

git-svn-id: http://address-sanitizer.googlecode.com/svn/trunk@2092 3c3640eb-14a6-2bb8-0b94-e9e73afe33f5