public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/17121] New: Link problem with function-local classes @ 2004-08-20 14:46 Richard dot Kreckel at Framatome-ANP dot com 2004-08-20 15:16 ` [Bug c++/17121] [3.5 regression] " bangerth at dealii dot org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: Richard dot Kreckel at Framatome-ANP dot com @ 2004-08-20 14:46 UTC (permalink / raw) To: gcc-bugs $ g++ -v Reading specs from /data/scratch/devtools/gcc-3.5.0-pre-20040815/lib/gcc/i686-pc-linux-gnu/3.5.0/specs Configured with: ../gcc-3.5-20040815/configure --prefix=/data/scratch/devtools/gcc-3.5.0-pre-20040815 --enable-languages=c,c++ --with-as=/data/scratch/binutils/2.15/bin/as --with-ld=/data/scratch/binutils/2.15/bin/ld --enable-__cxa_atexit --disable-nls i686-pc-linux-gnu Thread model: posix gcc version 3.5.0 20040815 (experimental) $ cat test.cc struct A { virtual ~A() {} }; void tsk_tsk() { struct B : public A {}; } $ cat main.cc int main() {} $ g++ -W -Wall -c test.cc $ g++ -W -Wall main.cc test.o test.o(.text+0x19): In function `tsk_tsk()': : undefined reference to `vtable for tsk_tsk()::B' test.o(.text+0x1d): In function `tsk_tsk()': : undefined reference to `tsk_tsk()::B::~B()' test.o(.text+0x23): In function `tsk_tsk()': : undefined reference to `vtable for tsk_tsk()::B' test.o(.text+0x27): In function `tsk_tsk()': : undefined reference to `tsk_tsk()::B::~B()' collect2: ld returned 1 exit status As far as I can tell, this used to work with all releases of GCC. -- Summary: Link problem with function-local classes Product: gcc Version: 3.5.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Richard dot Kreckel at Framatome-ANP 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=17121 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/17121] [3.5 regression] Link problem with function-local classes 2004-08-20 14:46 [Bug c++/17121] New: Link problem with function-local classes Richard dot Kreckel at Framatome-ANP dot com @ 2004-08-20 15:16 ` bangerth at dealii dot org 2004-08-20 15:17 ` bangerth at dealii dot org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bangerth at dealii dot org @ 2004-08-20 15:16 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |3.5.0 Known to work| |3.4.1 Summary|Link problem with function- |[3.5 regression] Link |local classes |problem with function-local | |classes Target Milestone|--- |3.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17121 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/17121] [3.5 regression] Link problem with function-local classes 2004-08-20 14:46 [Bug c++/17121] New: Link problem with function-local classes Richard dot Kreckel at Framatome-ANP dot com 2004-08-20 15:16 ` [Bug c++/17121] [3.5 regression] " bangerth at dealii dot org @ 2004-08-20 15:17 ` bangerth at dealii dot org 2004-08-20 15:34 ` pinskia at gcc dot gnu dot org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: bangerth at dealii dot org @ 2004-08-20 15:17 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2004-08-20 15:17 ------- Confirmed. A mainline regression. W. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2004-08-20 15:17:05 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17121 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/17121] [3.5 regression] Link problem with function-local classes 2004-08-20 14:46 [Bug c++/17121] New: Link problem with function-local classes Richard dot Kreckel at Framatome-ANP dot com 2004-08-20 15:16 ` [Bug c++/17121] [3.5 regression] " bangerth at dealii dot org 2004-08-20 15:17 ` bangerth at dealii dot org @ 2004-08-20 15:34 ` pinskia at gcc dot gnu dot org 2004-08-20 15:35 ` pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-08-20 15:34 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-20 15:34 ------- Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-08/msg01569.html> being testing right now. -- What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, wrong-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17121 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/17121] [3.5 regression] Link problem with function-local classes 2004-08-20 14:46 [Bug c++/17121] New: Link problem with function-local classes Richard dot Kreckel at Framatome-ANP dot com ` (2 preceding siblings ...) 2004-08-20 15:34 ` pinskia at gcc dot gnu dot org @ 2004-08-20 15:35 ` pinskia at gcc dot gnu dot org 2004-08-21 1:31 ` cvs-commit at gcc dot gnu dot org 2004-08-21 1:32 ` mmitchel at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-08-20 15:35 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-20 15:35 ------- Ignore that comment, that was a different bug. But I think this was caused by Mark's change for linkage (aka the always act as unit-at-a-time for C++). -- What |Removed |Added ---------------------------------------------------------------------------- CC| |mmitchel at gcc dot gnu dot | |org Keywords|patch | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17121 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/17121] [3.5 regression] Link problem with function-local classes 2004-08-20 14:46 [Bug c++/17121] New: Link problem with function-local classes Richard dot Kreckel at Framatome-ANP dot com ` (3 preceding siblings ...) 2004-08-20 15:35 ` pinskia at gcc dot gnu dot org @ 2004-08-21 1:31 ` cvs-commit at gcc dot gnu dot org 2004-08-21 1:32 ` mmitchel at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2004-08-21 1:31 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-08-21 01:31 ------- Subject: Bug 17121 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2004-08-21 01:31:27 Modified files: gcc/cp : ChangeLog decl.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/inherit: local1.C Log message: PR c++/17121 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P. PR c++/17121 * g++.dg/inherit/local2.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4292&r2=1.4293 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1275&r2=1.1276 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4169&r2=1.4170 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/local1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17121 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/17121] [3.5 regression] Link problem with function-local classes 2004-08-20 14:46 [Bug c++/17121] New: Link problem with function-local classes Richard dot Kreckel at Framatome-ANP dot com ` (4 preceding siblings ...) 2004-08-21 1:31 ` cvs-commit at gcc dot gnu dot org @ 2004-08-21 1:32 ` mmitchel at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: mmitchel at gcc dot gnu dot org @ 2004-08-21 1:32 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-21 01:32 ------- Fixed in GCC 3.5.0. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17121 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-08-21 1:32 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-08-20 14:46 [Bug c++/17121] New: Link problem with function-local classes Richard dot Kreckel at Framatome-ANP dot com 2004-08-20 15:16 ` [Bug c++/17121] [3.5 regression] " bangerth at dealii dot org 2004-08-20 15:17 ` bangerth at dealii dot org 2004-08-20 15:34 ` pinskia at gcc dot gnu dot org 2004-08-20 15:35 ` pinskia at gcc dot gnu dot org 2004-08-21 1:31 ` cvs-commit at gcc dot gnu dot org 2004-08-21 1:32 ` 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).