patch 8.0.0568: 1gd may hang

Problem:    "1gd" may hang.
Solution:   Don't get stuck in one position. (Christian Brabandt, closes #1643)
diff --git a/src/testdir/test_goto.vim b/src/testdir/test_goto.vim
index 2573401..ea67fe7 100644
--- a/src/testdir/test_goto.vim
+++ b/src/testdir/test_goto.vim
@@ -288,3 +288,24 @@
   set nocursorline
 endfunc
 
+func Test_gd_local_block()
+  let lines = [
+	\ '  int main()',
+	\ '{',
+	\ '  char *a = "NOT NULL";',
+	\ '  if(a)',
+	\ '  {',
+	\ '    char *b = a;',
+	\ '    printf("%s\n", b);',
+	\ '  }',
+	\ '  else',
+	\ '  {',
+	\ '    char *b = "NULL";',
+	\ '    return b;',
+	\ '  }',
+	\ '',
+	\ '  return 0;',
+	\ '}',
+  \ ]
+  call XTest_goto_decl('1gd', lines, 11, 11)
+endfunc