[Bug fortran/79430] [7 Regression] action of statement incorrectly optimised away

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 13 09:50:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430

--- Comment #29 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Jürgen Reuter from comment #24)
> Actually, the volatile attribute conflicts with the intent(in) of the final
> variable. But making the function result variable 'integral' volatile, does
> the job. Thanks for the suggestion. And sorry again for not producing a
> smaller case.

Could you maybe do the following:

- Use your normal sources

- Change the compilation options to add -fdump-tree-all to the relevant
  file

- Copy all the generated xxx.f90.whatever files (the tree dumps)
  to a different directory

- Change intent(in) to volatile

- Rerun the compilation

and then run diff on the tree dump files to the original ones?
If you see anything suspicious in the diffs, that might point
to something.  Maybe you could also attach the diffs, so somebody
else could take a look at it.


More information about the Gcc-bugs mailing list