<html>#2403: compile failure with gfortran 10 when using CCTK_PointerTo
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>open</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>blocker</td></tr>
<tr><td style='text-align:right'>Component:</td><td></td></tr>
</table>

<p>Comment (by Roland Haas):</p>
<p>Ok. <code>c_loc</code> is also odd. I just tried it like so using an older Intel compiler (on Caltech’s bethe worksttion):</p>
<div class="codehilite language-fortran"><pre><span></span>    <span class="kt">integer</span><span class="o">*</span><span class="mi">8</span> <span class="k">function </span><span class="n">ptrfun</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
      <span class="k">use </span><span class="nb">iso_c_binding</span><span class="p">,</span> <span class="n">only</span><span class="p">:</span> <span class="nb">c_loc</span><span class="p">,</span> <span class="kt">c_ptr</span>

<span class="kt">      </span><span class="k">implicit none</span>

<span class="k">      </span><span class="kt">integer</span><span class="p">,</span> <span class="k">TARGET</span><span class="p">,</span> <span class="k">dimension</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="kd">::</span> <span class="n">a</span>
      <span class="k">external</span> <span class="kd">::</span> <span class="n">ptrfun0</span>
      <span class="kt">integer</span><span class="o">*</span><span class="mi">8</span> <span class="kd">::</span> <span class="n">ptrfun0</span>
      <span class="k">type</span><span class="p">(</span><span class="kt">c_ptr</span><span class="p">)</span> <span class="kd">::</span> <span class="n">ptr</span>

      <span class="n">ptr</span> <span class="o">=</span> <span class="nb">c_loc</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
      <span class="n">ptrfun</span> <span class="o">=</span> <span class="n">ptrfun0</span><span class="p">(</span><span class="n">ptr</span><span class="p">)</span>
      <span class="k">print</span> <span class="o">*</span><span class="p">,</span> <span class="s2">&quot;funret&quot;</span><span class="p">,</span> <span class="n">ptrfun</span>

    <span class="k">end function</span>
</pre></div>


<p>and whatever <code>ptr</code> ends up being is not the address of the 
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2403/compile-failure-with-gfortran-10-when'>https://bitbucket.org/einsteintoolkit/tickets/issues/2403/compile-failure-with-gfortran-10-when</a></p>
</html>