public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11421] New: [3.4 regression] vtables are not emitted in unit-at-a-time mode
@ 2003-07-03  9:00 martin at mpa-garching dot mpg dot de
  2003-07-03 12:23 ` [Bug optimization/11421] " jh at suse dot cz
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2003-07-03  9:00 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=11421

           Summary: [3.4 regression] vtables are not emitted in unit-at-a-
                    time mode
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org,jh at suse dot cz
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

Consider the following two files:

foo.cc:

struct foo {
  virtual void bar();
  };

void foo::bar() {}

>>>>>>>> end of foo.cc

main.cc

struct foo {
  virtual void bar();
  };

int main() {
  foo var1;
  }

>>>>>>>> end of main.cc

Compiling with
  g++ main.cc foo.cc
works, but
  g++ -funit-at-a-time main.cc foo.cc
results in
  /tmp/cc85sQ35.o: In function `foo::foo[in-charge]()':
  /tmp/cc85sQ35.o(.gnu.linkonce.t._ZN3fooC1Ev+0x8): undefined reference to
`vtable for foo'
  collect2: ld returned 1 exit status

Doing a "nm foo.o" shows that the vtable is not in the object file.

This test was done with gcc version 3.4 20030703 (experimental), with
the suggested fix for PR 11403 applied to gcc/cp/typeck.c


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

end of thread, other threads:[~2003-07-27 20:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03  9:00 [Bug optimization/11421] New: [3.4 regression] vtables are not emitted in unit-at-a-time mode martin at mpa-garching dot mpg dot de
2003-07-03 12:23 ` [Bug optimization/11421] " jh at suse dot cz
2003-07-03 12:29 ` pinskia at physics dot uc dot edu
2003-07-03 13:35 ` kraai at alumni dot cmu dot edu
2003-07-03 16:34 ` martin at mpa-garching dot mpg dot de
2003-07-03 16:49 ` jh at suse dot cz
2003-07-03 16:57 ` jh at suse dot cz
2003-07-03 17:21 ` martin at mpa-garching dot mpg dot de
2003-07-03 17:22 ` martin at mpa-garching dot mpg dot de
2003-07-03 17:30 ` jh at suse dot cz
2003-07-03 18:34 ` martin at mpa-garching dot mpg dot de
2003-07-03 18:36 ` jh at suse dot cz
2003-07-07  9:53 ` martin at mpa-garching dot mpg dot de
2003-07-07 21:36 ` jh at suse dot cz
2003-07-07 21:56 ` falk dot hueffner at student dot uni-tuebingen dot de
2003-07-08  9:49 ` martin at mpa-garching dot mpg dot de
2003-07-08 13:27 ` jh at suse dot cz
2003-07-09  0:38 ` jh at suse dot cz
2003-07-10  6:37 ` mark at codesourcery dot com
2003-07-27 20:43 ` hubicka 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).