[Patch, fortran-dev] SELECT TYPE execution and allocatable scalar components

Janus Weil janus@gcc.gnu.org
Tue Sep 22 15:45:00 GMT 2009


> Salvatore, your new ICE is caused by statements like
>
> ALLOCATE(x, SOURCE=y)
>
> where x and y are CLASS.

Ok, here is a patch which fixes it. However, I had to modify some code
that Steve recently committed as r151023, when he implemented the
SOURCE argument of ALLOCATE.

Steve, maybe you can have a look at the patch, to check that I don't
mess anything up (at least the test cases that came with your patch
still work).

In particular I moved the code, which does the initialization via the
SOURCE argument, from gfc_trans_allocate to resolve_allocate_expr. I
think that makes sense, since also the 'default initialization' is
done in resolve_allocate_expr, and one surely does not need to do
both, right?

Of course I then added some code to handle the initialization of CLASS
variables (with SOURCE and also via default initialization).

Regarding PSBLAS: The ICE from before has gone, and I get trouble only
much later in 'base/serial/f03/psbn_d_csr_impl.f03' (a bunch of error
messages, but no ICE). I haven't really looked into this yet.

Cheers,
Janus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allocate.diff
Type: text/x-diff
Size: 4409 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090922/1688c44a/attachment.bin>


More information about the Fortran mailing list