2018-07-17 19:34 GMT+02:00 Thomas Koenig : > Am 17.07.2018 um 19:19 schrieb Janus Weil: >> However, the test case above seems to indicate that the >> function-elimination optimization is not applied to impure functions >> anyway (which is good IMHO). > > If you specify -faggressive-function-elimination, it is also > done for impure (and non implicitly-pure) functions. Ah, ok. > Problem is that, in all probability, nobody uses this option at the > moment. That's probably true, but it should get a little better once we move it into -Wextra. >> It that is true, then my modifications >> practically disable the old -Wfunction-elimination warnings completely >> :/ > > I do not think it would be a problem not to warn for removing > calls to pure or implicitly pure fuctions. The test cases can > easily be modified not to emit this warning, as you did. > > As the author of the original test cases, I may be able to > say so with a certain amount of credibility. Good, so let's do this. Attached is another update of my patch, which incorporates all of Fritz' comments and should regtest cleanly now. In function_optimize_5.f90 I have removed the warnings for pure functions and instead added -faggressive-function-elimination and the corresponding warnings for impure functions, which were apparently not covered by the testsuite before. I do hope that things have converged by now and that this will be the last incarnation of the patch. If there is no more feedback in the next 24 hours, I'll commit this tomorrow. Cheers, Janus