[Bug fortran/55069] TRIM incorrectly optimized out for assignment to allocatable strings (deferred length)

quantheory at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 25 17:49:00 GMT 2012


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

--- Comment #3 from Sean Santos <quantheory at gmail dot com> 2012-10-25 17:49:44 UTC ---
Ah, it seems I was quite tired yesterday and made a couple mistakes:

- I mixed up a test using an older gfortran version with a test with
optimization off. I suppose that this is not a regression after all.

- At some point, I seem to have changed my test case to make "blah" a
parameter. If "blah" is a parameter, the behavior I described actually is what
happens.

Sorry about the mixups.

As for updating compilers, unfortunately this is not really a decision I can
make. My group is required to maintain this software for on several specific
machines (not under our direct control) that can go >1 year between major
compiler updates. I'm only even using 4.7 because I expect that my current work
won't get merged to the trunk for several months anyway. If 4.8 is released in
March, I can't expect to release anything that depends on it until 2014.

My current workaround is to simply concatenate the empty string onto every
affected assignment. Luckily there are not many, and this appears to work for
every test case in my limited needs.



More information about the Gcc-bugs mailing list