public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/35402]  New: Store CCP will not inline static const variable which is default initialized
@ 2008-02-28 22:09 pinskia at gcc dot gnu dot org
  2008-02-28 22:09 ` [Bug tree-optimization/35402] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-28 22:09 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-03-06 21:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28 22:09 [Bug tree-optimization/35402] New: Store CCP will not inline static const variable which is default initialized pinskia at gcc dot gnu dot org
2008-02-28 22:09 ` [Bug tree-optimization/35402] " pinskia at gcc dot gnu dot org
2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
2008-02-28 22:27 ` pinskia at gcc dot gnu dot org
2008-02-29 12:43 ` rguenth at gcc dot gnu dot org
2008-03-05 23:40 ` pinskia at gcc dot gnu dot org
2008-03-06 21:57 ` pinskia at gcc dot gnu dot org
2008-03-06 21:59 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).