Issue 1:
The following valid code snippet originally from pymc/gibbsit.f (cf https://github.com/pymc-devs/pymc/blob/master/pymc/gibbsit.f ) exhibits the problem:

...
program gibbsit

integer maxiterates
parameter (maxiterates=50000)

integer maxseries
parameter (maxseries=20)

integer maxqcnt
parameter (maxqcnt=20)

integer wasize
parameter (wasize=maxiterates*2)

showing up for f2py version 2 in numpy 1.12.0 as:

Line #196 in pymc/gibbsit.f:" parameter (wasize=maxiterates*2)"
get_parameters: got "unexpected EOF while parsing (<string>, line 0)" on ''
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-en5WK5/pymc/setup.py", line 124, in <module>
**(config_dict))
File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/egg_info.py", line 18, in run
self.run_command("build_src")
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py", line 148, in run
self.build_sources()
File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py", line 165, in build_sources
self.build_extension_sources(ext)
File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py", line 327, in build_extension_sources
sources = self.f2py_sources(sources, ext)
File "/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py", line 564, in f2py_sources
['-m', ext_name]+f_sources)
File "/usr/local/lib/python2.7/dist-packages/numpy/f2py/f2py2e.py", line 408, in run_main
postlist = callcrackfortran(files, options)
File "/usr/local/lib/python2.7/dist-packages/numpy/f2py/f2py2e.py", line 329, in callcrackfortran
postlist = crackfortran.crackfortran(files)
File "/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py", line 3245, in crackfortran
readfortrancode(files, crackline)
File "/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py", line 511, in readfortrancode
dowithline(finalline)
File "/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py", line 782, in crackline
analyzeline(m, pat[1], line)
File "/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py", line 1188, in analyzeline
t = determineexprtype(initexpr, params)
File "/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py", line 2971, in determineexprtype
return _ensure_exprdict(vars[e])
File "/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py", line 2947, in _ensure_exprdict
raise AssertionError(repr(r))
AssertionError: ''

a pull request with a proposal to fix it will follow.

Issue 2:
I now get lots of output of the form

(...)
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c: At top level:
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:1052:21: error: expected expression before â��,â�� token
{"namezone",2,{{++,8}},NPY_CHAR},
^
//tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2468:15: note: (near initialization for â��f2py_vars_def[848].dims.d[0]â��)
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2474:18: error: expected expression before â��,â�� token
{"ionbmax",2,{{,8}},NPY_CHAR},
^
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2474:18: error: initializer element is not constant
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2474:18: note: (near initialization for â��f2py_vars_def[854].dims.d[0]â��)
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2501:15: error: invalid type argument of unary â��*â�� (have â��intâ��)
{"dbuf",1,{{*(+2)}},NPY_DOUBLE},
^~~~~
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2501:15: error: initializer element is not constant
{"dbuf",1,{{*(+2)}},NPY_DOUBLE},
^
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2501:15: note: (near initialization for â��f2py_vars_def[881].dims.d[0]â��)
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2503:18: error: expected expression before â��}â�� token
{"ppnold",1,{{*}},NPY_DOUBLE},
^
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:1667:19: error: wrong type argument to unary minus
{"idumhead",1,{{-}},NPY_INT},
^
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:3547:14: note: (near initialization for â��f2py_zbrn_def[13].dims.d[0]â��)
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:3699:19: error: expected expression before â��,â�� token
{"uuidhist",3,{{,,16}},NPY_CHAR},
^
(...)
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/tmpgnfiujz_/src.linux-x86_64-3.6 -I/home/alex/Python/lib/python3.6/site-packages/numpy/core/include -I/home/alex/Python/include/python3.6m -c /tmp/tmpgnfiujz_/src.linux-x86_64-3.6/_keplermodule.c -o /tmp/tmpgnfiujz_/tmp/tmpgnfiujz_/src.linux-x86_64-3.6/_keplermodule.o" failed with exit status 1

in f2py in NumPy version 1.12.0 from PyPi and I can no longer compile the code. For comparison, all worked fine in NumPy 1.11.3.

I am using Python 3.6.0, compiled with optimisation from the sources on Python.org on Fedora 25, gcc version 6.3.1 20161221 (Red Hat 6.3.1-1).

Seems to me something in the parsing is no longer working, not sure about the origin of all the special characters in the output either.