[J3] Type-spec for a type that has a coarray ultimate component

Malcolm Cohen malcolm at nag-j.co.jp
Tue Aug 17 02:12:05 UTC 2021


Hi Vipul,

 

I don’t see any ambiguity or lack of clarity in the standard here, and the violation by the program is pretty obvious.

 

It seems unlikely that the compilers are thinking ahead to F202x... one might wonder how a whole set of people can overlook checking a constraint, but it seems to happen quite a bit.

 

Please report compiler bugs directly to the vendors, I know they appreciate it. (Or at least more than washing their dirty linen in public.)

 

Cheers,

-- 

..............Malcolm Cohen, NAG Oxford/Tokyo.

 

From: J3 <j3-bounces at mailman.j3-fortran.org> On Behalf Of Vipul Parekh via J3
Sent: Tuesday, August 17, 2021 4:38 AM
To: General J3 interest list <j3 at mailman.j3-fortran.org>
Cc: Vipul Parekh <parekhvs at gmail.com>
Subject: [J3] Type-spec for a type that has a coarray ultimate component

 

Constraint C937 in 18-007r1 that states, "type-spec shall not specify a type that has a coarray ultimate component."

 

Now consider the following code with which three different processors fail to issue any diagnostics:

 

   type :: a_t
      integer, allocatable :: n[:]
   end type
   class(*), allocatable :: a
   allocate( a_t :: a )
end

 

Are these processors right in compiling the above code as not being in violation of C937?

 

Thank you,

Vipul Parekh

 

Disclaimer

The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: 30 St. Giles, Oxford, OX1 3LE, United Kingdom. Please see our Privacy Notice <https://www.nag.co.uk/content/privacy-notice>  for information on how we process personal data and for details of how to stop or limit communications from us.

This e-mail has been scanned for all viruses and malware, and may have been automatically archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210817/cbb763ff/attachment.htm>


More information about the J3 mailing list