At the time a68_extract_indicants executes nothing guarantees that the
module text following a module symbol is well formed.
gcc/algol68/ChangeLog:
* a68-parser-extract.cc (a68_extract_indicants): Don't call FORWARD if
skip_module_text returns NO_NODE.
gcc/testsuite/ChangeLog:
* algol68/compile/error-module-definition-1.a68: New test.
* algol68/compile/error-module-definition-2.a68: New test.
else
{
q = skip_module_text (NEXT (q));
- FORWARD (q);
+ if (q == NO_NODE)
+ siga = false;
+ else
+ FORWARD (q);
}
}
else
--- /dev/null
+module Module = { dg-error "" }
--- /dev/null
+module Module = { dg-error "" }
+begin
+end