This is the mail archive of the gcc-bugs@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]

[Bug fortran/20520] allocatable arrays used uninitialized without a warning


------- Additional Comments From ebertakis at gmail dot com  2005-03-20 19:22 -------
(In reply to comment #4)
This case is slightly different. The compiler just warns you that you are using
variable x before its value have been defined. Many programmers (that have bad
programming habits :-) probably that includes myself!) take for granted that
variables have an initial value equal to 0 once their memory space is reserved
upon definition as e.g. real. That is not always true and is heavily dependant
on the compiler that is used. Many compilers fill the variables with garbage
when they are first declared. See also the Fortran FAQ (paragraph 3.2.3):
http://www.faqs.org/faqs/fortran-faq/
That is why you got that warning. I believe it is not related to the array usage.

-- 


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


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