------- Comment #1 from pinskia at gcc dot gnu dot org 2008-05-28 08:21 ------- I think this is more of an issue of changing the variable to be readonly than an "inlining" the variable issue as the following source works as expected: template <int a> int f(int i) { static const int t = a; static const int t1 = a; return i?t:t1; }
int g(void) { return f<1>(1); } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|missed "inlining" of static |missed "inlining" of static |untouched variable in linked|untouched variable in linked |once function |once function http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36352