This is the mail archive of the gcc-patches@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]

Re: [Patch, Fotran] Fix PR 4755 - Do not free + reallocate a variable that is already allocated.


Hi Tobias,

Just a quick update so you know what I'm doing.

On 07/22/2011 10:09 PM, Tobias Burnus wrote:
However, the bug is not fully fixed. If you try the testcase in the
bugreport, you will see that it still fails - the stat= is correctly
set, but the array shape is wrong.

Working on it...



The problem is that the "a.dim" setting should be done after allocation
in the inner loop - also the a.offset is misplaced. If possible, one
should also move the "D.1585" into the inner "else" block, which would
save one from using the following code in case the memory is already
allocated:

D.1585 = a.data;
...
a.data = D.1585;

I'm working on this right now. I see a few instances of code like this in the output tree. I think there is an opportunity to make the output tree much cleaner and maybe also make the GCC internals cleaner.


I hope to have something to show you soon-ish.

Daniel.
--
I'm not overweight, I'm undertall.


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