<p dir="auto">The following valid code snippet originally from pymc/gibbsit.f  (cf  <a href="https://github.com/pymc-devs/pymc/blob/master/pymc/gibbsit.f">https://github.com/pymc-devs/pymc/blob/master/pymc/gibbsit.f</a> )  exhibits the problem:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="...
      program   gibbsit

      integer   maxiterates
      parameter (maxiterates=50000)

      integer   maxseries
      parameter (maxseries=20)

      integer   maxqcnt
      parameter (maxqcnt=20)

      integer   wasize
      parameter (wasize=maxiterates*2)"><pre class="notranslate"><code class="notranslate">...
      program   gibbsit

      integer   maxiterates
      parameter (maxiterates=50000)

      integer   maxseries
      parameter (maxseries=20)

      integer   maxqcnt
      parameter (maxqcnt=20)

      integer   wasize
      parameter (wasize=maxiterates*2)
</code></pre></div>
<p dir="auto">showing up for f2py version 2 in numpy 1.12.0 as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   Line #196 in pymc/gibbsit.f:&quot;      parameter (wasize=maxiterates*2)&quot;
        get_parameters: got &quot;unexpected EOF while parsing (&lt;string&gt;, line 0)&quot; on ''
    Traceback (most recent call last):
      File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
      File &quot;/tmp/pip-build-en5WK5/pymc/setup.py&quot;, line 124, in &lt;module&gt;
        **(config_dict))
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/distutils/core.py&quot;, line 169, in setup
        return old_setup(**new_attr)
      File &quot;/usr/lib/python2.7/distutils/core.py&quot;, line 151, in setup
        dist.run_commands()
      File &quot;/usr/lib/python2.7/distutils/dist.py&quot;, line 953, in run_commands
        self.run_command(cmd)
      File &quot;/usr/lib/python2.7/distutils/dist.py&quot;, line 972, in run_command
        cmd_obj.run()
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/egg_info.py&quot;, line 18, in run
        self.run_command(&quot;build_src&quot;)
      File &quot;/usr/lib/python2.7/distutils/cmd.py&quot;, line 326, in run_command
        self.distribution.run_command(command)
      File &quot;/usr/lib/python2.7/distutils/dist.py&quot;, line 972, in run_command
        cmd_obj.run()
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py&quot;, line 148, in run
        self.build_sources()
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py&quot;, line 165, in build_sources
        self.build_extension_sources(ext)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py&quot;, line 327, in build_extension_sources
        sources = self.f2py_sources(sources, ext)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/distutils/command/build_src.py&quot;, line 564, in f2py_sources
        ['-m', ext_name]+f_sources)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/f2py/f2py2e.py&quot;, line 408, in run_main
        postlist = callcrackfortran(files, options)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/f2py/f2py2e.py&quot;, line 329, in callcrackfortran
        postlist = crackfortran.crackfortran(files)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py&quot;, line 3245, in crackfortran
        readfortrancode(files, crackline)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py&quot;, line 511, in readfortrancode
        dowithline(finalline)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py&quot;, line 782, in crackline
        analyzeline(m, pat[1], line)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py&quot;, line 1188, in analyzeline
        t = determineexprtype(initexpr, params)
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py&quot;, line 2971, in determineexprtype
        return _ensure_exprdict(vars[e])
      File &quot;/usr/local/lib/python2.7/dist-packages/numpy/f2py/crackfortran.py&quot;, line 2947, in _ensure_exprdict
        raise AssertionError(repr(r))
    AssertionError: ''"><pre class="notranslate"><code class="notranslate">   Line #196 in pymc/gibbsit.f:"      parameter (wasize=maxiterates*2)"
        get_parameters: got "unexpected EOF while parsing (&lt;string&gt;, line 0)" on ''
    Traceback (most recent call last):
      File "&lt;string&gt;", line 1, in &lt;module&gt;
      File "/tmp/pip-build-en5WK5/pymc/setup.py", line 124, in &lt;module&gt;
        **(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: ''
</code></pre></div>
<p dir="auto">a pull request with a proposal to fix it will follow.</p>
<p dir="auto">I now get lots of output of the form</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(...)
/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
   {&quot;namezone&quot;,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
   {&quot;ionbmax&quot;,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â��)
   {&quot;dbuf&quot;,1,{{*(+2)}},NPY_DOUBLE},
               ^~~~~
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:2501:15: error: initializer element is not constant
   {&quot;dbuf&quot;,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
   {&quot;ppnold&quot;,1,{{*}},NPY_DOUBLE},
                  ^
/tmp/tmp8i0j4nc_/src.linux-x86_64-3.6/_keplermodule.c:1667:19: error: wrong type argument to unary minus
   {&quot;idumhead&quot;,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
   {&quot;uuidhist&quot;,3,{{,,16}},NPY_CHAR},
                   ^
(...)
error: Command &quot;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&quot; failed with exit status 1"><pre class="notranslate"><code class="notranslate">(...)
/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
</code></pre></div>
<p dir="auto">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.</p>
<p dir="auto">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).</p>
<p dir="auto">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.</p>