public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12574] New: another unit-at-a-time bug?
@ 2003-10-11  2:18 gcc-bugzilla at gcc dot gnu dot org
  2003-10-11  2:28 ` [Bug c++/12574] [3.4 Regression] [unti-at-a-time] not emitting function referenced from a weak symbol pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2003-10-11  2:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           Summary: another unit-at-a-time bug?
           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


Here's another case where gcc 3.4 fails to emit a required function definition.
>From a quick look, it looks like all the existing unit-at-a-time PRs have
been closed, so i hope this isn't a duplicate.

When the source below is compiled at -O2 or above, there's a reference
to the function `A::foo', but the definition isn't emitted:

$ cc1plus -quiet -O2 x.cc
$ grep foo x.s
        movl    $_ZN1A3fooEv, (%eax)
$

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

	
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 this with -O2 or above:

------------------------------------------------------------------------
struct A
{
  static int foo() { return 0; }
};


template <class TYPE>
class C
{
public:
  C ();
  int (*f_)(void);
};


template <class TYPE>
C<TYPE>::C ()
  : f_ (A::foo)
{
}


void open ()
{
  C<int> th;
}
------------------------------------------------------------------------


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

end of thread, other threads:[~2003-10-15 23:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-11  2:18 [Bug c++/12574] New: another unit-at-a-time bug? gcc-bugzilla at gcc dot gnu dot org
2003-10-11  2:28 ` [Bug c++/12574] [3.4 Regression] [unti-at-a-time] not emitting function referenced from a weak symbol pinskia at gcc dot gnu dot org
2003-10-11  2:29 ` pinskia at gcc dot gnu dot org
2003-10-11 17:56 ` [Bug c++/12574] [3.4 Regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org
2003-10-14  5:16 ` pinskia at gcc dot gnu dot org
2003-10-14  8:16 ` jh at suse dot cz
2003-10-15 23:14 ` 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).