------- Comment #26 from jvdelisle at gcc dot gnu dot org 2009-06-11 02:25 ------- CP2K still fails. However, I think I have discovered the root cause. String constants in formats are saved in the fnode at sting.p which is a pointer. When we use cached parsed string data, those constant strings are net getting copied and saved along with the parsed format.
That "constant" string is used by write_constant_string in transfer.c. This is an issue with the concept because the constant string can vary with each invocation of the IO statement, as is the case with CP2k, and it is freed at the end of each IO operation. The benefit of caching is lost if we have to reparse to find the strings This leaves the possibility of disabling the caching if a FMT_STRING token is found while parsing the format the first time. I am going to suggest we revert format caching from 4.4 right away and probably 4.5 if some better idea does not pop into my head. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40330