[Bug fortran/44354] incorrect output at run time

zeccav at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon May 31 21:38:00 GMT 2010



------- Comment #9 from zeccav at gmail dot com  2010-05-31 21:37 -------
Subject: Re:  incorrect output at run time

In my example 'i' is local to the array constructor, while 'I' is
global and is initialized with value 5, so that the statement should
display '1 2 3 4 5'. I agree that this is a pathological example, but
still gfortran should follow the standard and output the correct data.

2010/5/31, mikael at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org>:
>
>
> ------- Comment #7 from mikael at gcc dot gnu dot org  2010-05-31 21:31
> -------
> (In reply to comment #6)
>> because in the above 'i' and 'I' are in the same scoping unit.
> I couldn't find what mandates in the standard that i and I are in a
> different
> scoping unit/are different variables. Are they ?
>
>> If you write 'i = 5; j = [(i,i=1,I)]' then the 'i' here is in
>> a different scoping unit.  I agree that the scalar-int-expr
>> '1' and 'I' need to be evaluated to establish the the loop
>> start and stop values.  The question again based on scoping
>> unit is whether 'I' is uninitialized.
>>
> How could it be ?
>
>
> --
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44354
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44354



More information about the Gcc-bugs mailing list