summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/preproc/variable.c')
-rw-r--r--src/interfaces/ecpg/preproc/variable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c
index a4294b8f0ff..ac80d2c0209 100644
--- a/src/interfaces/ecpg/preproc/variable.c
+++ b/src/interfaces/ecpg/preproc/variable.c
@@ -233,7 +233,8 @@ find_variable(const char *name)
p = find_simple(name);
if (p == NULL)
mmfatal(PARSE_ERROR, "variable \"%s\" is not declared", name);
-
+ if (p->type->type != ECPGt_array)
+ mmfatal(PARSE_ERROR, "variable \"%s\" is not a pointer", name);
*next = c;
switch (p->type->u.element->type)
{