Bug 27896 - lower-gimple produces extra goto for once return functions
Summary: lower-gimple produces extra goto for once return functions
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.0.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: compile-time-hog, memory-hog
Depends on:
Blocks:
 
Reported: 2006-06-05 07:07 UTC by Dan Nicolaescu
Modified: 2015-10-20 14:51 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-12-07 00:46:46


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Nicolaescu 2006-06-05 07:07:01 UTC
The .lower dump for this code: int foo (void) { return 1;} looks like:

foo ()
{
  goto <D1524>;
  <D1524>:;
  return 1;

"goto" to the next line is useless, this just increases the memory usage and it needs extra work to be eliminated in a subsequent pass...
Comment 1 Andrew Pinski 2006-06-09 07:25:35 UTC
Confirmed.
Comment 2 Dan Nicolaescu 2006-06-13 14:18:18 UTC
Add Diego to the CC list as per his request.
Comment 3 Steven Bosscher 2010-02-24 16:34:30 UTC
Still a problem, actually worse now than before (.009t.lower dump at r156926):

;; Function foo (foo)

foo ()
{
  int D.1974;

  D.1974 = 1;
  goto <D.1975>;
  <D.1975>:
  return D.1974;
}

The decomposition of "return 1" shows up already in the "004t.gimple" dump.