public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/13842] New: static inline erroneously emitted
@ 2004-01-24  1:48 dje at transmeta dot com
  2004-01-24  2:03 ` [Bug c/13842] [3.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dje at transmeta dot com @ 2004-01-24  1:48 UTC (permalink / raw)
  To: gcc-bugs

static inline functions are not emitted if they are not referenced.
The following case may fall on the boundary, however it use to work
(e.g. in gcc 2.96) and it works in gcc 3.4, so I'm guessing this is
a regression in the 3.3 branch.
I was able to recreate the problem with the current head of the gcc-3_3-branch
branch.

Consider:

static inline int foo (void);

static inline int
foocaller (void)
{
    return foo ();
}

extern int bar (void);

extern int blah;

static inline int
foo (void)
{
    return bar ();
}

int
lala (void)
{
    return blah;
}

bash$ gcc-3.3.3 -c -O2 -fno-inline foo.c
bash$ nm foo.o
         U bar
         U blah
00000000 t foo
0000000c T lala

Note that `foo' has been emitted.
[which isn't that big a deal except that an undefined reference has
also been emitted that didn't get emitted before]

Again, given the presence of -fno-inline,
whether y'all want to declare this a bug or not is up for discussion
I guess.  However, this use to work, and it works in the gcc 3.4 branch,
thus I'm guessing this is a regression.
[where "works" means `foo' and the undefined reference to `bar' do
not get emitted]

-- 
           Summary: static inline erroneously emitted
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dje at transmeta dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c/13842] [3.3 Regression] static inline erroneously emitted
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
@ 2004-01-24  2:03 ` pinskia at gcc dot gnu dot org
  2004-01-24  2:13 ` [Bug c/13842] [3.3 Regression] static inline emitted when not used dje at transmeta dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-24  2:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-24 02:03 -------
Confirmed but a very minor regression because it is okay to emit something when it is not 
referenced anyways, just 3.4 does a better job at checking if it is used or not.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-24 02:03:16
               date|                            |
            Summary|static inline erroneously   |[3.3 Regression] static
                   |emitted                     |inline erroneously emitted
   Target Milestone|---                         |3.3.3


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
  2004-01-24  2:03 ` [Bug c/13842] [3.3 Regression] " pinskia at gcc dot gnu dot org
@ 2004-01-24  2:13 ` dje at transmeta dot com
  2004-02-15 12:41 ` gdr at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dje at transmeta dot com @ 2004-01-24  2:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at transmeta dot com  2004-01-24 02:13 -------
(In reply to comment #1)
> Confirmed but a very minor regression because it is okay to emit something
when it is not 
> referenced anyways, just 3.4 does a better job at checking if it is used or not.

Don't forget that it's not just `foo' but also the undefined reference to `bar'.
Link failures are occuring that didn't occur before.


-- 


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
  2004-01-24  2:03 ` [Bug c/13842] [3.3 Regression] " pinskia at gcc dot gnu dot org
  2004-01-24  2:13 ` [Bug c/13842] [3.3 Regression] static inline emitted when not used dje at transmeta dot com
@ 2004-02-15 12:41 ` gdr at gcc dot gnu dot org
  2004-06-11 22:22 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-02-15 12:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-02-15 12:40 -------
Adjust milestone

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.3                       |3.3.4


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
                   ` (2 preceding siblings ...)
  2004-02-15 12:41 ` gdr at gcc dot gnu dot org
@ 2004-06-11 22:22 ` pinskia at gcc dot gnu dot org
  2004-09-28 13:25 ` gdr at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-11 22:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.4                       |3.3.5


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
                   ` (3 preceding siblings ...)
  2004-06-11 22:22 ` pinskia at gcc dot gnu dot org
@ 2004-09-28 13:25 ` gdr at gcc dot gnu dot org
  2004-09-28 13:29 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-09-28 13:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-09-28 13:25 -------
slip.

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


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
                   ` (4 preceding siblings ...)
  2004-09-28 13:25 ` gdr at gcc dot gnu dot org
@ 2004-09-28 13:29 ` pinskia at gcc dot gnu dot org
  2004-09-28 13:53 ` gdr at cs dot tamu dot edu
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 13:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-28 13:29 -------
I am going to assume you did not mean to close this bug, only to move the target milestone.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
                   ` (5 preceding siblings ...)
  2004-09-28 13:29 ` pinskia at gcc dot gnu dot org
@ 2004-09-28 13:53 ` gdr at cs dot tamu dot edu
  2004-12-28  2:15 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at cs dot tamu dot edu @ 2004-09-28 13:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at cs dot tamu dot edu  2004-09-28 13:53 -------
Subject: Re:  [3.3 Regression] static inline emitted when not used

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| I am going to assume you did not mean to close this bug, only to
| move the target milestone. 

Yes.  I don't know how bugzilla got the idea that I was closing it.

-- Gaby


-- 


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
                   ` (7 preceding siblings ...)
  2004-12-28  2:15 ` pinskia at gcc dot gnu dot org
@ 2004-12-28  2:15 ` pinskia at gcc dot gnu dot org
  2005-04-30 13:30 ` gdr at gcc dot gnu dot org
  2005-04-30 14:32 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-28  2:15 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
   Last reconfirmed|2004-09-10 00:45:14         |2004-12-28 02:15:23
               date|                            |


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
                   ` (6 preceding siblings ...)
  2004-09-28 13:53 ` gdr at cs dot tamu dot edu
@ 2004-12-28  2:15 ` pinskia at gcc dot gnu dot org
  2004-12-28  2:15 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-28  2:15 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
                   ` (8 preceding siblings ...)
  2004-12-28  2:15 ` pinskia at gcc dot gnu dot org
@ 2005-04-30 13:30 ` gdr at gcc dot gnu dot org
  2005-04-30 14:32 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 13:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2005-04-30 13:30 -------
Not critical. Fixed in 3.4.x

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


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


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

* [Bug c/13842] [3.3 Regression] static inline emitted when not used
  2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
                   ` (9 preceding siblings ...)
  2005-04-30 13:30 ` gdr at gcc dot gnu dot org
@ 2005-04-30 14:32 ` gdr at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 14:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2005-04-30 14:32 -------
closing as fixed for 3.4.x

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.0                       |3.4.3


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


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

end of thread, other threads:[~2005-04-30 14:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-24  1:48 [Bug c/13842] New: static inline erroneously emitted dje at transmeta dot com
2004-01-24  2:03 ` [Bug c/13842] [3.3 Regression] " pinskia at gcc dot gnu dot org
2004-01-24  2:13 ` [Bug c/13842] [3.3 Regression] static inline emitted when not used dje at transmeta dot com
2004-02-15 12:41 ` gdr at gcc dot gnu dot org
2004-06-11 22:22 ` pinskia at gcc dot gnu dot org
2004-09-28 13:25 ` gdr at gcc dot gnu dot org
2004-09-28 13:29 ` pinskia at gcc dot gnu dot org
2004-09-28 13:53 ` gdr at cs dot tamu dot edu
2004-12-28  2:15 ` pinskia at gcc dot gnu dot org
2004-12-28  2:15 ` pinskia at gcc dot gnu dot org
2005-04-30 13:30 ` gdr at gcc dot gnu dot org
2005-04-30 14:32 ` gdr 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).