This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] |
2009/6/2 Paul Richard Thomas <paul.richard.thomas@gmail.com>:Tobias,
This is the issue, apparently the optimizer can't handle inlining functions with static variables (SAVE in Fortran). I verified with a C example that indeed functions with static variables are not inlined if they're called more than once.
Huh? It works for me: int f(int g1, int b) { static int g; if (b) g = 1; return g; }
int h(void) { return f(1, 0); }
int j(int a, int b) { return f(a, b); }
Cheers, - Tobi
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |