This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: [PATCH, fortran] PR20441 -finit-local-zero


François-Xavier Coudert wrote:
PS: I wonder whether it makes sense to have -finit-character=c to
initially character variables with, e.g. "XXXXXXXXXXXXXXXXXXXX".
It makes sense, but I left it out because I didn't know if anyone
would find it useful.  I can easily add an finit-character option,
though.

I'd find it useful. I think -finit-character=32 would fill with spaces, and so on (ie, using a ASCII value as argument).

I'm wondering if all these options are really useful enough to justify their existence. What additional benefit does this fine-grained control have over, say, one option that allows me to give a 32bit value that will be filled into any variable's space? This suggestions allows behavior for -finit-local-zero, and therefore fixes the backwards ocmpatibility issue. For debugging, I don't think there's a realistic case where this is not sufficient.


I'm somewhat doubtful that the maintenance overhead is worth the general solution. We have already identified two cases previously not thought of in this thread. Another issue that has remained unadressed so far: what happens if I initialize a INTEGER*1 to 2**20? I'm sure I could think of more issues or potential headaches.

Cheers,
- Tobi


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