This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug tree-optimization/36352] missed "inlining" of static untouched variable in linked once function



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]