gfortran ICE

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Tue Jun 28 21:23:00 GMT 2005


Bernhard Fischer wrote:
> PR 19669 shows a segfault in mio_ref, i'm in mio_component_ref which
> admittedly is called from mio_ref. But you're right, it's the same
> thing. My backtrace with 2005-06-27 gcc-HEAD is attached for reference.
> 
> Can somebody elaborate on that bug and explain what would be needed to
> fix it, please?

I can't answer that question, as I've not investigated this PR thoroughly, but
WRT to your patchlet ...

> PS:
> On an unrelated note, what about looking at p->{left,right} first before
> recursing into load_needed()? Find attached patchlet to better explain
> what i mean.
...
>    if (p == NULL)
>      return 0;
> -  if (load_needed (p->left))
> +  if (p->left && load_needed (p->left))
>      return 1;
> -  if (load_needed (p->right))
> +  if (p->right && load_needed (p->right))
>      return 1;
>  
>    if (p->type != P_SYMBOL || p->u.rsym.state != NEEDED)

I'd hope that the compiler can figure out this optimization.  I don't know if
it does, though.

- Tobi



More information about the Fortran mailing list