This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized
- 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 Feb 2008 22:08:39 -0000
- Subject: [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Testcase:
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
static const int conststaticvariable;
int f(void)
{
return conststaticvariable;
}
/* There should be no reference to conststaticvariable as we should have
inlined the 0. */
/* { dg-final { scan-tree-dump-times "conststaticvariable" o "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--
Summary: Store CCP will not inline static const variable which is
default initialized
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35402