gnu /
gcc /
d109ad5e96ee9d31cbab0bba385fb490275a9937 cobol/119229 - fix external variable declaration
The following makes vs_external_reference behave like documented,
declare a variable defined elsewhere which means not setting
TREE_STATIC but DECL_EXTERNAL.
Built on x86_64-unknown-linux-gnu, tested with the cobol.dg
testsuite (which doesn't mean much). The removed comment mentions
'stderr', possibly the NIST testsuite has coverage.
OK for trunk?
Thanks,
Richard.
PR cobol/119229
* gengen.cc (gg_declare_variable): Use DECL_EXTERNAL and
drop TREE_STATIC for vs_external_reference.
* cobol.dg/pr119229.cob: New testcase.
2 files changed