This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11702] New: Failure to emit code for inlined function in space


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Failure to emit code for inlined function in space
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: snyder at fnal dot gov
                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


Thanks for the fix for c++/11530.
That patch fixed the test case i had earlier.
However, with that patch, i see a new failure, as shown in the example
below.  Here, we don't get code emitted for the right() function
when we compile with -O3.
Note that it works ok if right() is at global scope, rather than
in namespace NS.

$ g++ -o x -O3 x.cc
/tmp/cc4Tsvn2.o: In function `main':
/tmp/cc4Tsvn2.o(.text+0x1a): undefined reference to `NS::right()'
collect2: ld returned 1 exit status
$

Environment:
System: Linux karma 2.4.19-emp_2419p5a829i #1 Tue Sep 3 17:42:17 EST 2002 i686 i686 i386 GNU/Linux
Architecture: i686

	<machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77

How-To-Repeat:

Compile and link:

--------------------------
namespace NS
{
  inline int right() {}
}
int foo (int (*pf) ()) { return pf(); }

int main()
{
  return foo (NS::right);
}
--------------------------
------- Additional Comments From snyder at fnal dot gov  2003-07-29 05:32 -------
Fix:
	<how to correct or work around the problem, if known (multiple lines)>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]