This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [OOP] SELECT TYPE with CLASS IS
- From: Salvatore Filippone <salvatore dot filippone at uniroma2 dot it>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: gfortran <fortran at gcc dot gnu dot org>
- Date: Sun, 08 Nov 2009 12:13:40 +0100
- Subject: Re: [OOP] SELECT TYPE with CLASS IS
- References: <854832d40911071420l4f328ac8jf4bc93aef0955d41@mail.gmail.com>
- Reply-to: salvatore dot filippone at uniroma2 dot it
Yes, I have CLASS IS statements around (they were purged early on in the
version I sent you).
I will test this afternoon.
Regards
Salvatore
Il giorno sab, 07/11/2009 alle 23.20 +0100, Janus Weil ha scritto:
> Hi folks,
>
> here is an early shot at CLASS IS. As announced before, my
> implementation uses the library function "is_extension_of" that I
> introduced with the EXTENDS_TYPE_OF patch and translates the CLASS IS
> cases into a chain of IF/ELSE IF statements (you can have a look at
> the dump for the attached test case to see an example of the code it
> generates). The patch is not quite complete yet, since CLASS IS cases
> are not being sorted if they're in the wrong order. But apart from
> this, most things should work already. In particular the following
> cases:
>
> * SELECT TYPE statements with only one CLASS IS branch
> * those cases where the CLASS IS labels are not extensions of each other, or
> * cases where the CLASS IS labels are sorted in the right way
> manually (i.e. extensions before their parents)
>
> If anyone wants to try it out or have a look at the patch, that would
> be great (the patch has to be applied to the fortran-dev branch, btw).
> I'll try to get the sorting right soon.
>
> Salvatore, do you have a version of your code which includes CLASS IS
> cases? If yes, can you try the patch on it, or alternatively send your
> code to me, so that I can try it? [Without the sorting, the runtime
> behaviour can potentially be wrong, but hopefully there should be no
> compile-time problems.]
>
> Cheers,
> Janus
--
Salvatore Filippone
Dip. Ingegneria Meccanica, Universita' di Roma "Tor Vergata",
Via del Politecnico 1, I-00133, Roma, Italy
tel: +39-0672597558 fax: +39-062021351
Cell.: (+39) 320 7983524 e-mail: salvatore.filippone@uniroma2.it
homepage: http://www.ce.uniroma2.it/people/filippone.html
"..ma misi me per l'alto mare aperto..." Dante
"whenever it is a damp, drizzly November in my soul...
I account it high time to get to sea " Melville