This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] SELECT TYPE via ASSOCIATE


2010/8/26 Salvatore Filippone <salvatore.filippone@uniroma2.it>:
> Il giorno gio, 26/08/2010 alle 18.33 +0200, Tobias Burnus ha scritto:
>> On 08/26/2010 05:32 PM, Salvatore Filippone wrote:
>> > It's a variation of the original test case, and produces:
>> > [sfilippo@donald bug20]$ ./bug20_dx
>> > ? Dynamic type on entry: XBASE
>> > ? Not implemented yet
>> > ? Dynamic type CLASS DEFAULT clause: DBASE
>> >
>> > which is pure nonsense :-)
>>
>> What's the expected output? I get the same output with another compiler
>> (but no crash) while all my other compilers do not compile the program
>> or crash earlier. Seemingly, it works with one of your compilers ...
>>
>> Tobias
>>
> ..e.g.: XLF 13.1
>
> [snfilip@josquin GNUBUILD]$ /opt/ibmcmp/xlf/13.1/bin/xlf2003 -o bug20_dx
> bug20_dx.f90
> ** base_mat_mod ? === End of Compilation 1 ===
> ** d_base_mat_mod ? === End of Compilation 2 ===
> ** d_mat_mod ? === End of Compilation 3 ===
> ** bug20 ? === End of Compilation 4 ===
> 1501-510 ?Compilation successful for file bug20_dx.f90.
> [snfilip@josquin GNUBUILD]$ ./bug20_dx
> ?Dynamic type on entry: XBASE
> ?Not implemented yet
> ?Dynamic type CLASS DEFAULT clause: XBASE


XLF is certainly right about this, since F08 says:

"Within the block following a CLASS DEFAULT type guard statement, the
associating entity is polymorphic and
has the same declared type as the selector. The type parameter values
of the associating entity are those of the
declared type of the selector."

This is now PR 45420.

Cheers,
Janus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]