LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 25 - When compiling with -O3, global functions are being marked link-once and deleted by optimizer!
Summary: When compiling with -O3, global functions are being marked link-once and dele...
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-g++ (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Chris Lattner
URL:
Keywords: miscompilation
Depends on:
Blocks:
 
Reported: 2003-10-09 15:08 PDT by Chris Lattner
Modified: 2010-02-22 12:41 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2003-10-09 15:08:53 PDT
This testcase is eliminated:

---- foo.c ----
int main() {
  return 10;
}
----
$ llvmg++ -O3 ehtest.cc -c -o - | & llvm-dis
<empty>
Comment 1 Chris Lattner 2003-10-10 00:19:55 PDT
This is now fixed.  It turned out to be the difference between DECL_INLINE and
DECL_DECLARED_INLINE_P.  Geeze.