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, fortran] Implement VOLATILE statement/attribute (PR 29601)


Hi,

FX Coudert schrieb:
> OK. The only question I have is if you made sure that your patch does
> the right thing for allocatable objects and pointers, where both
> allocation/association status as well as the actual content should be
> marked VOLATILE. I don't see it explicitly done in the patch, and in
> these cases the volatile qualification does not appear in the tree
> dump, but the tests I made looked like it works ok (but it's hard to
> say, because the optimizer is not clever enough for all cases, anyway :)
I changed your tests a bit by moving the initialization directly before
the if and removed a do loop now the optimization works,
i.e. the volatile version remains and the non-volatile is optimized away.
Thanks for the two extra test cases.

(The problem with your version is possibly related to PR29738 and
PR29751; if you have a nice C case, you should fill a PR to
tree-optimization.)

Commited as revision 118545 after regression testing with the two new
test cases on .

Tobias


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