Hi, if I dump the tree of the following C program, int main() { volatile int i; i = 5; return 0; } I get (-tree-original): { volatile int i; volatile int i; i = 5; return 0; }
However, if I apply my volatile-in-Fortran patch [1] and compile integer, volatile :: i; i = 5; end then the dumped tree contains: { int4 i; _gfortran_set_std (70, 127, 0); i = 5; } I use in my patch: + if (sym->attr.volatile_) + TREE_THIS_VOLATILE (decl) = 1; Question: - Is TREE_THIS_VOLATILE the right thing to do? - How do I see (tree dump etc.) whether I did the right change? Tobias PS: I sneaked at g95 and there Andy also uses TREE_THIS_VOLATILE; g95 -fdump-tree-original has also no "volatile". [1] http://gcc.gnu.org/ml/gcc-patches/2006-10/msg01601.html