<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>Nope, having one routine per rank does not work either. Apparently once one has</p>
<div class="codehilite language-fortran"><pre><span></span>    <span class="n">CCTK_POINTER</span> <span class="k">function </span><span class="n">CCTK_PointerTo2</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
      <span class="k">type</span><span class="p">(</span><span class="o">*</span><span class="p">),</span><span class="k">dimension</span><span class="p">(:,:)</span> <span class="kd">::</span> <span class="n">a</span>
    <span class="k">end function</span>
</pre></div>


<p>ie two assumed dimensions (and it must be assumed, the compiler will not let me have fixed dimension but assumed type) then the first argument seen by the C code is no longer the pointer to the first element of the array (but a pointer to something else). Next t o try is the <code>c_loc</code> function I guess. <span class="ap-mention" data-atlassian-id="557058:f7fd5133-6eee-4385-a5e5-3e03342a0b24">@Peter Diener</span> do you have any suggestions what I could try instead?</p>
<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>