public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/15345] New: unreferenced nested inline functions not optimized away
@ 2004-05-09 17:26 dank at kegel dot com
  2004-05-09 18:59 ` [Bug optimization/15345] [3.4/3.5 Regression] [non-unit-at-a-time] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dank at kegel dot com @ 2004-05-09 17:26 UTC (permalink / raw)
  To: gcc-bugs

On gcc-3.4.0, unreferenced nested inline functions are not
optimized away at -O0 or -O1.  This is a regression from gcc-2.95.x and gcc-3.2.2.
This breaks building glibc-2.3.2 for sparc64 (see
http://sources.redhat.com/ml/libc-alpha/2004-05/msg00066.html)
No idea why it doesn't break other architectures.

Here's a small test case:

void f(void)
{
        inline int g(void) {
            extern int should_be_optimized_away(void);
            return should_be_optimized_away();
        }
}

Compile with -S, then examine the .s file; you'll
see a reference to should_be_optimized_away that shouldn't be there.

-- 
           Summary: unreferenced nested inline functions not optimized away
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dank at kegel dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-07-21 17:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-09 17:26 [Bug optimization/15345] New: unreferenced nested inline functions not optimized away dank at kegel dot com
2004-05-09 18:59 ` [Bug optimization/15345] [3.4/3.5 Regression] [non-unit-at-a-time] " pinskia at gcc dot gnu dot org
2004-06-12 22:05 ` [Bug middle-end/15345] [3.4 " mmitchel at gcc dot gnu dot org
2004-06-13 14:13 ` jh at suse dot cz
2004-06-21 17:47 ` hubicka at gcc dot gnu dot org
2004-06-21 21:22 ` mmitchel at gcc dot gnu dot org
2004-07-02 20:47 ` pinskia at gcc dot gnu dot org
2004-07-09 16:48 ` pinskia at gcc dot gnu dot org
2004-07-19 14:11 ` jakub at gcc dot gnu dot org
2004-07-19 15:44 ` jh at suse dot cz
2004-07-21  7:37 ` cvs-commit at gcc dot gnu dot org
2004-07-21  7:39 ` cvs-commit at gcc dot gnu dot org
2004-07-21 17:54 ` 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).