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/35402] New: Store CCP will not inline static const variable which is default initialized


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


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