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: Janus Weil <janus at gcc dot gnu dot org>
- To: "Rouson, Damian" <rouson at sandia dot gov>
- Cc: gfortran <fortran at gcc dot gnu dot org>, "salvatore dot filippone at uniroma2 dot it" <salvatore dot filippone at uniroma2 dot it>, Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Date: Sun, 8 Nov 2009 14:09:52 +0100
- Subject: Re: [OOP] SELECT TYPE with CLASS IS
- References: <854832d40911071420l4f328ac8jf4bc93aef0955d41@mail.gmail.com> <C71B34EC.9FDD%rouson@sandia.gov>
Hi Damian,
> I have code that uses CLASS IS and will be glad to do some testing once I
> resolve my issues with building the code. ?The two most convenient platforms
> for me are Mac OS X and AIX, but I have trouble building on both of those.
building GCC on darwin10 works fine for me at r154009. What problems
do you encounter? Still the dsymutil issue?
Dominique, what's the status of PR41473? Is this resolved, or is there
a workaround?
Cheers,
Janus
> On 11/7/09 2:20 PM, "Janus Weil" <janus@gcc.gnu.org> wrote:
>
>> 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
>>
>
>
>