public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions
@ 2004-06-08  9:27 dannysmith at users dot sourceforge dot net
  2004-06-08 12:15 ` [Bug c++/15871] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2004-06-08  9:27 UTC (permalink / raw)
  To: gcc-bugs

Compiling  following:

inline void foo(void) {  }

produces this on g++ (3.4.1)
> g++ -fkeep-inline-functions  -S -Wall  -O2 foo.C 

	.file	"foo.C"

g++ (3.5.0) also fails to emit the function.

on 3.3.3 the function was emitted, as the doc's say it should be:

> g++-3.3.3 -fkeep-inline-functions  -S -Wall  -O2 foo.C 

	.file	"foo.C"
	.section	.text$_Z3foov,"x"
	.linkonce discard
	.align 2
	.p2align 4,,15
.globl __Z3foov
	.def	__Z3foov;	.scl	2;	.type	32;	.endef
__Z3foov:
	pushl	%ebp
	movl	%esp, %ebp
	popl	%ebp
	ret


-fkeep-inline-functions does work as expected on 3.4.1 and 3.5.0 with C 
compiler.

-- 
           Summary: g++ does not honour -fkeep-inline-functions
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dannysmith at users dot sourceforge dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-mingw32
  GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32


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


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

* [Bug c++/15871] [3.4/3.5 Regression] g++ does not honour -fkeep-inline-functions
  2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
@ 2004-06-08 12:15 ` pinskia at gcc dot gnu dot org
  2004-08-10  1:37 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-08 12:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-08 12:15 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-08 12:15:37
               date|                            |
            Summary|g++ does not honour -fkeep- |[3.4/3.5 Regression] g++
                   |inline-functions            |does not honour -fkeep-
                   |                            |inline-functions
   Target Milestone|---                         |3.4.2


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


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

* [Bug c++/15871] [3.4/3.5 Regression] g++ does not honour -fkeep-inline-functions
  2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
  2004-06-08 12:15 ` [Bug c++/15871] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-08-10  1:37 ` pinskia at gcc dot gnu dot org
  2004-08-17 17:50 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-10  1:37 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
   Last reconfirmed|2004-06-08 12:15:37         |2004-08-10 01:37:11
               date|                            |


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


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

* [Bug c++/15871] [3.4/3.5 Regression] g++ does not honour -fkeep-inline-functions
  2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
  2004-06-08 12:15 ` [Bug c++/15871] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
  2004-08-10  1:37 ` pinskia at gcc dot gnu dot org
@ 2004-08-17 17:50 ` mmitchel at gcc dot gnu dot org
  2004-08-17 20:56 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-17 17:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-17 17:50 -------
The documentation is not clear about what should happen in C++.  The
documentation for -fkeep-inline-functions specifically refers to static inlines,
and says that it has no effect on extern inline functions, in the sense of the
GNU C extension.

This ordinary C++ inline function is neither static nor extern inline, in the
sense of the GNU C extension.

However, I think that interpreting this switch as meaning that inline functions
should be kept in C++ makes sense.  I will fix it, and update the documentation.

I'm not sure yet whether this should be fixed for GCC 3.4.2, or just GCC 3.5;
that will depend on how invasive the fix appears to be.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/15871] [3.4/3.5 Regression] g++ does not honour -fkeep-inline-functions
  2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
                   ` (2 preceding siblings ...)
  2004-08-17 17:50 ` mmitchel at gcc dot gnu dot org
@ 2004-08-17 20:56 ` cvs-commit at gcc dot gnu dot org
  2004-08-17 21:02 ` [Bug c++/15871] [3.4 " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-17 20:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-17 20:56 -------
Subject: Bug 15871

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-08-17 20:56:25

Modified files:
	gcc            : ChangeLog 
	gcc/cp         : ChangeLog semantics.c 
	gcc/doc        : invoke.texi 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/opt: inline8.C 

Log message:
	PR c++/15871
	* semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
	
	PR c++/15871
	* doc/invoke.texi (-fkeep-inline-functions): Update documentation.
	
	PR c++/15871
	* g++.dg/opt/inline8.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4940&r2=2.4941
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4278&r2=1.4279
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.424&r2=1.425
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&r1=1.508&r2=1.509
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4150&r2=1.4151
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/inline8.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/15871] [3.4 Regression] g++ does not honour -fkeep-inline-functions
  2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
                   ` (3 preceding siblings ...)
  2004-08-17 20:56 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-17 21:02 ` mmitchel at gcc dot gnu dot org
  2004-08-29 17:55 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-17 21:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-17 21:02 -------
Fixed in GCC 3.5.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|3.4.0 3.5.0                 |3.4.0
            Summary|[3.4/3.5 Regression] g++    |[3.4 Regression] g++ does
                   |does not honour -fkeep-     |not honour -fkeep-inline-
                   |inline-functions            |functions


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


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

* [Bug c++/15871] [3.4 Regression] g++ does not honour -fkeep-inline-functions
  2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
                   ` (4 preceding siblings ...)
  2004-08-17 21:02 ` [Bug c++/15871] [3.4 " mmitchel at gcc dot gnu dot org
@ 2004-08-29 17:55 ` mmitchel at gcc dot gnu dot org
  2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
  2005-05-10  1:35 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-29 17:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-29 17:55 -------
Postponed until GCC 3.4.3.

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


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


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

* [Bug c++/15871] [3.4 Regression] g++ does not honour -fkeep-inline-functions
  2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
                   ` (5 preceding siblings ...)
  2004-08-29 17:55 ` mmitchel at gcc dot gnu dot org
@ 2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
  2005-05-10  1:35 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01  0:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-01 00:45 -------
Postponed until GCC 3.4.4.

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


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


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

* [Bug c++/15871] [3.4 Regression] g++ does not honour -fkeep-inline-functions
  2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
                   ` (6 preceding siblings ...)
  2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
@ 2005-05-10  1:35 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-10  1:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-05-10 01:35 -------
Fixed in 4.0; will not be fixed in 3.4.x.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|3.4.4                       |4.0.0


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


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

end of thread, other threads:[~2005-05-10  1:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-08  9:27 [Bug c++/15871] New: g++ does not honour -fkeep-inline-functions dannysmith at users dot sourceforge dot net
2004-06-08 12:15 ` [Bug c++/15871] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-08-10  1:37 ` pinskia at gcc dot gnu dot org
2004-08-17 17:50 ` mmitchel at gcc dot gnu dot org
2004-08-17 20:56 ` cvs-commit at gcc dot gnu dot org
2004-08-17 21:02 ` [Bug c++/15871] [3.4 " mmitchel at gcc dot gnu dot org
2004-08-29 17:55 ` mmitchel at gcc dot gnu dot org
2004-11-01  0:46 ` mmitchel at gcc dot gnu dot org
2005-05-10  1:35 ` mmitchel 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).