Hi Janne, > But yes, I'm still seeing the warning messages with -O1 for > allocate_deferred_char_scalar_1.f03. AFAICT it's a bogus warning, but > I don't know how to get rid of it..
No, that warning isn't at all bogus. The warning in fact is astonishingly precise. When I remember correctly, then the warning complains about trying to put a string of length 8 into memory of length 5. There is never a memory access error at runtime, because the code generated ensures that only 5 chars are copied, but I am impressed by the analysis done by some intermediate step of gcc. It figures, that memory is available for 5 characters only derefing a "static/constant" pointer and then learning that initially 8 chars are to be copied. I already tried to fix this by only generating code to copy the 5 characters and make this knowledge available to the gimplifier, but I failed to deref the pointer and get the information statically. So IMHO the warning is not bogus. It is absolutely correct and it is quite sophisticated to learn all the necessary facts, but I didn't find a way to get this done in the front-end. We might be able to prevent the warning when there is a chance to add some hook into the middle stages of the compiler, telling it, that everything is fine. But I have no idea what is possible and available there. Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de