public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/20115] New: [4.0 Regression] Pure functions are missed handled
@ 2005-02-21 14:54 pinskia at gcc dot gnu dot org
  2005-02-21 14:57 ` [Bug tree-optimization/20115] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-21 14:54 UTC (permalink / raw)
  To: gcc-bugs

Take the following code, we should not abort:
int func_pure (void);
void func_other (int);
int global_int;
int func_pure (void) { return global_int; }
void func_other (int a)
{
  global_int = a + 1;
}
int f(void)
{
  int a;
  a = func_pure();
  func_other (a);
  a = func_pure (); // We are removing this function call
  return a;
}
void abort (void);

int main(void)
{
  global_int = 10;
  if (f() != 11)
    abort ();
}

-- 
           Summary: [4.0 Regression] Pure functions are missed handled
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20115


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

end of thread, other threads:[~2005-02-23 11:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-21 14:54 [Bug tree-optimization/20115] New: [4.0 Regression] Pure functions are missed handled pinskia at gcc dot gnu dot org
2005-02-21 14:57 ` [Bug tree-optimization/20115] " pinskia at gcc dot gnu dot org
2005-02-21 15:15 ` pinskia at gcc dot gnu dot org
2005-02-21 15:44 ` [Bug tree-optimization/20115] [4.0 Regression] Pure functions are mishandled pinskia at gcc dot gnu dot org
2005-02-22 14:06 ` belyshev at depni dot sinp dot msu dot ru
2005-02-22 18:27 ` jakub at gcc dot gnu dot org
2005-02-22 18:41 ` pinskia at gcc dot gnu dot org
2005-02-22 19:01 ` pinskia at gcc dot gnu dot org
2005-02-22 19:50 ` pinskia at gcc dot gnu dot org
2005-02-22 19:54 ` dnovillo at gcc dot gnu dot org
2005-02-23  1:12 ` dnovillo at gcc dot gnu dot org
2005-02-23 12:30 ` cvs-commit at gcc dot gnu dot org
2005-02-23 15:23 ` steven 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).