------- Comment #2 from dominiq at lps dot ens dot fr 2010-07-02 08:19 ------- > And the problem is: How should the compiler know that "ddx" does not use the > (host associated) "dudx"? Note: The function "ddx" is not declared as PURE - > and also cannot simply marked as pure as it host-associates the variables "I" > and "J" - thus a simple check for no host association would not work. > > Hence, I fail to see how the compiler can handle it. Unless you find an > example > where the compiler could know it, I fear one has to close the PR as WONTFIX.
(1) Please refrain to close this pr. (2) I'll have a closer look to what's happening at the inlining level (i.e., before revision 161550 the functions ddx and ddy were inlined. I don't know if it is still the case). (3) The body of ddx does not use dudx or dhdx (ddy does not use dydy or dhdy) and u,v, and h don't allias with dudx, ..., so it is not difficult for the user to check that there is no need for temporaries. Why should it be impossible for the compiler? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44773