1# This file is part of Mailfromd testsuite. -*- Autotest -*-
2# Copyright (C) 2007-2021 Sergey Poznyakoff
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17AT_SETUP([duplicate declarations of automatic variables])
18AT_KEYWORDS([variable variables shadow auto ashadow])
19
20# Synopsis: Duplicated auto variables caused infinite loop in forget_autos
21# in version 4.1
22# Reported: Jan Rafaj, 2007-08-10
23# References: <Pine.LNX.4.58.0708101024210.11880@cedric.unob.cz>
24
25MF_CHECK_TEXT([
26func foo() returns number
27do
28  number i 2
29  number i 2
30done],
31[],
32[EX_CONFIG],
33[],
34[mailfromd: prog:5.10: duplicate variable: i
35])
36
37AT_CLEANUP
38
39