pr28923

Richard E Maine Richard.Maine@nasa.gov
Tue Sep 5 15:45:00 GMT 2006


On Sep 1, 2006, at 2:11 AM, Dominique Dhumieres wrote:

> I just filles pr28923:
>
> The following program: [elided]
> compiles with gfortran...
> instead of giving:
>
> real, dimension(2,3) :: b=a(:2:-1,:)
>                           1
> Error: Array assignment at (1) has different sizes (6/0)
>
> as required by the following first and last paragraphs (draft f2003):

An admittedly nitpicky wording correction.... I agree that the code  
is erroneous, as explained in your posting. I also agree that the  
compiler ought to give an error message. However, my correction is to  
note that the standard does not require such an error message in this  
case. This does not violate a constraint of any of the other  
conditions that lead to a standard requirement for an error message.  
There just ought to be an error message because that's a useful thing  
for the compiler to do here - not because the standard requires it.

Per the standard, this is the kind of nonstandard code that the  
compiler can do anything with.

It doesn't actually change what should be done here (the compiler  
ought to give the error message). I'm just posting this to keep  
people on the "straight and narrow" as regards to interpretation of  
the standard.

-- 
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                             |        -- Mark Twain



More information about the Fortran mailing list