public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/20386] New: Missing computed goto to normal goto optimization
@ 2005-03-08 18:30 pinskia at gcc dot gnu dot org
  2005-03-17 17:45 ` [Bug tree-optimization/20386] " pinskia at gcc dot gnu dot org
  2005-07-31 21:04 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-08 18:30 UTC (permalink / raw)
  To: gcc-bugs

We miss a computed goto to non computed got if there is code between the assignment and the goto:
void g();
int f(int i)
{
  void *a;
  if (i) a = &&l1;
  else a = &&l2;
  g();
  goto *a;
l1:
  return 1;
l2:
  return 2;
}

I saw this while debugging PR13024.java and why if I tried compiling it with javac it passed.
That function should be equivalent to the following:
void g();
int f(int i)
{
  void *a;
  g();
  if (i) a = &&l1;
  else a = &&l2;
  goto *a;
l1:
  return 1;
l2:
  return 2;
}
where we check i is not revalant here.

-- 
           Summary: Missing computed goto to normal goto optimization
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          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=20386


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

* [Bug tree-optimization/20386] Missing computed goto to normal goto optimization
  2005-03-08 18:30 [Bug tree-optimization/20386] New: Missing computed goto to normal goto optimization pinskia at gcc dot gnu dot org
@ 2005-03-17 17:45 ` pinskia at gcc dot gnu dot org
  2005-07-31 21:04 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-17 17:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-17 17:45 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-17 17:45:43
               date|                            |


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


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

* [Bug tree-optimization/20386] Missing computed goto to normal goto optimization
  2005-03-08 18:30 [Bug tree-optimization/20386] New: Missing computed goto to normal goto optimization pinskia at gcc dot gnu dot org
  2005-03-17 17:45 ` [Bug tree-optimization/20386] " pinskia at gcc dot gnu dot org
@ 2005-07-31 21:04 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-31 21:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-31 19:49 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2005-07-31 19:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-08 18:30 [Bug tree-optimization/20386] New: Missing computed goto to normal goto optimization pinskia at gcc dot gnu dot org
2005-03-17 17:45 ` [Bug tree-optimization/20386] " pinskia at gcc dot gnu dot org
2005-07-31 21:04 ` 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).