bug in defined type default initialization

Aleksander Schwarzenberg-Czerny alex@camk.edu.pl
Thu May 29 08:13:00 GMT 2008


Hi,
Chaps, I was fascinated by your quick response (over weekend!!!)
As an afterthought, I think my bug example is deficient in that
it does not differentiate between zeroing memory by compiler and by
instruction. Hence, I propose to use
a%i=+1 line
in place of a%i=0

I do appreciate your effort, as well as the complementary one by Andy 
Vaughan. Eventually, we do need gcc integrated optimizing >=f95 gnu 
compiler.
In the meantime, near 15 years after f95 definition, we definitely need
any reliable working gnu f95 compiler, lest young people drift to else 
languages. This circumstance makes big difference compared to g77,
developed in parallel with functioning f2c/f77. Hence 
comfortable eco-niches for both gfortran and g95,
(as aptly explained by P.Brooks elsewhere).
Cheers,
Alex

On Sun, 
18 
May 2008, Paul Richard Thomas wrote:

> Tobias and Aleksander,
>
>
>> With gfortran 4.4.0 as of 2008-03-28 (133678) it fails ("0, 0") while with the 2008-04-03 (133863) version it works ("-1, -1").
>> Assuming that my tree did not include any relevant patch, it must have been fixed between these versions, however, I
>> cannot find any Fortran patch which does this.
>
> The only relevant patch that I can see is on April 19th - my fix for
> PR35959.  This was applied to 4.3 as well.  It also falls out of the
> revision range that you mention.
>
>> Note: The the original dump (-fdump-tree-original) of gfortran 4.3.0 (of openSUSE) and 4.4.0 (of today) is identical!
>> Thus it might be a middle-end problem.
>
>> As this is a nasty bug, one should consider narrowing down the patch which fixed it. Then one can backport it to 4.3.0.
>> (I glanced also at the middle-end ChangeLog, but could not find anything obvious.)
>
> Indeed it is a nasty bug.  Strangely my trunk and 4.3 both give the
> same, correct result.
>
> gcc version 4.3.1 20080428 (prerelease) (GCC)
>
> and
>
> gcc version 4.4.0 20080502 (experimental) (GCC)
>
> Both on Cygwin/i686
>
> Puzzled
>
> Paul
>



More information about the Fortran mailing list