This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36352] missed "inlining" of static untouched variable in linked once function
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2008 08:21:54 -0000
- Subject: [Bug tree-optimization/36352] missed "inlining" of static untouched variable in linked once function
- References: <bug-36352-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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