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/59537] No "Automatic array cannot have an initializer", for -finit-real without a SAVE statement present in subroutine


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

--- Comment #6 from Lorenz HÃdepohl <bugs at stellardeath dot org> ---
>> Nonetheless, code that compiles without -finit-real should also compile
>> with -finit-real, right?
>
> I disagree: C506 states that automatic object cannot be initialized. What is 
> wrong is that it depends on the presence of the SAVE statement without a saved
> entity list.

Well, I guess it depends on what meaning one wants to assign to the flag
-finit-real, which is anyway not something the standard specifies, right?

Do you really want to restrict the usage of -finit-real to programs where every
last variable is initializable?

I always use -finit-real as a kind of debug feature, with -finit-real=snan, to
check for the use of uninitialized values. I did never expect that it should
have a well defined, standard-mandated effect.

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