http://sources.redhat.com/bugzilla/show_bug.cgi?id=233 has a testcase where g++ generates non-debug local references to linkonce sections. Due to a linker bug, those references are ignored, which may lead to linker failure or corrupted binary. With the fixed linker, I get [hjl@gnu obj]$ g++ main.o modules/.libs/libmodules.a -B./ `local symbol 0' referenced in section `.text': discarded in section `.gnu.linkonce.d._ZTIP9CTemplateIhE' from modules/.libs/libmodules.a(secondmodule.o) `local symbol 1' referenced in section `.text': discarded in section `.gnu.linkonce.d._ZTIP9CTemplateIhE' from modules/.libs/libmodules.a(secondmodule.o)
Huh? If that is the case then every gcc since 3.0 has been wrong.
It could be the case. BTW, local references to linkonce sections may be OK if they are also in linkonce sections. In any case, it doesn't make any senses to have local definions in linkonce sections referenced by other non-linkonce sections.
(Reply to Andrews comment from 06/29): The bug appeared on my system not with 3.0 but with a later version. It may be though that the problem has been introduced with 3.0. My project (which I stripped down to the testcase http://sources.redhat.com/bugzilla/show_bug.cgi?id=233 also mentioned by HJL) failed to build starting around the beginning of may on Debian/sid. I don't know if this can help find the relevant gcc-parts which have been modified at that time but who knows...
A patch is posted at http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00526.html
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00526.html>.
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Changes by: hjl@gcc.gnu.org 2004-07-07 18:29:40 Modified files: gcc/cp : ChangeLog rtti.c Log message: 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> PR c++/16276 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo is not public. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4172&r2=1.4173 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&r1=1.185&r2=1.186
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: hjl@gcc.gnu.org 2004-07-07 18:30:19 Modified files: gcc/cp : ChangeLog rtti.c Log message: 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> PR c++/16276 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo is not public. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.130&r2=1.3892.2.131 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.176.4.3&r2=1.176.4.4
A testcase patch is at http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00637.html
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Changes by: hjl@gcc.gnu.org 2004-07-08 04:58:11 Modified files: gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/rtti: tinfo1.C Log message: 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> PR c++/16276 * g++.dg/rtti/tinfo1.C: New file. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3949&r2=1.3950 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/rtti/tinfo1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: hjl@gcc.gnu.org 2004-07-08 05:00:49 Modified files: gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/rtti: tinfo1.C Log message: 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> PR c++/16276 * g++.dg/rtti/tinfo1.C: New file. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.222&r2=1.3389.2.223 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/rtti/tinfo1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
Fixed for 3.4.2.
Created attachment 6709 [details] Another testcase There are still references to linkonce - sections - now in .rodata. I cannot reopen the bug, so this has to do someone else. I still think it makes sense not to file a new one because it is related to the same problem. Attached is a testcase. It uses vigra (template-based image processing library), and I could not strip it down to not using it.
Your testcase won't even compile with gcc 3.4.1: /usr/gcc-3.4/bin/g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"linkoncebug\" -DVERSION=\"0.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -I../.. -g -O2 -c firstvigramodule.cpp -fPIC -DPIC -o .libs/firstvigramodule.o In file included from ../../vigra/stdimage.hxx:27, from ../../vigra/edgedetection.hxx:31, from firstvigramodule.cpp:4: ../../vigra/basicimage.hxx: In member function `PIXELTYPE& vigra::BasicImageIterator<PIXELTYPE, ITERATOR>::operator*() const': ../../vigra/basicimage.hxx:289: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx:289: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) ../../vigra/basicimage.hxx: In member function `PIXELTYPE* vigra::BasicImageIterator<PIXELTYPE, ITERATOR>::operator->() const': ../../vigra/basicimage.hxx:294: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `PIXELTYPE& vigra::BasicImageIterator<PIXELTYPE, ITERATOR>::operator[](const vigra::Diff2D&) const': ../../vigra/basicimage.hxx:299: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `PIXELTYPE& vigra::BasicImageIterator<PIXELTYPE, ITERATOR>::operator()(int, int) const': ../../vigra/basicimage.hxx:304: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `PIXELTYPE* vigra::BasicImageIterator<PIXELTYPE, ITERATOR>::operator[](int) const': ../../vigra/basicimage.hxx:309: error: `y' undeclared (first use this function) ../../vigra/basicimage.hxx:309: error: (Each undeclared identifier is reported only once for each function it appears in.) ../../vigra/basicimage.hxx:309: error: `x' undeclared (first use this function) ../../vigra/basicimage.hxx: In member function `PIXELTYPE* vigra::BasicImageIterator<PIXELTYPE, ITERATOR>::rowIterator() const': ../../vigra/basicimage.hxx:313: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `vigra::IteratorAdaptor<vigra::LineBasedColumnIteratorPolicy<vigra::BasicImageIterator<PIXELTYPE, ITERATOR> > > vigra::BasicImageIterator<PIXELTYPE, ITERATOR>::columnIterator() const': ../../vigra/basicimage.hxx:318: error: there are no arguments to `line' that depend on a template parameter, so a declaration of `line' must be available ../../vigra/basicimage.hxx:318: error: `x' undeclared (first use this function) ../../vigra/basicimage.hxx: In member function `const PIXELTYPE& vigra::ConstBasicImageIterator<PIXELTYPE, ITERATOR>::operator*() const': ../../vigra/basicimage.hxx:422: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `const PIXELTYPE* vigra::ConstBasicImageIterator<PIXELTYPE, ITERATOR>::operator->() const': ../../vigra/basicimage.hxx:427: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `const PIXELTYPE& vigra::ConstBasicImageIterator<PIXELTYPE, ITERATOR>::operator[](const vigra::Diff2D&) const': ../../vigra/basicimage.hxx:432: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `const PIXELTYPE& vigra::ConstBasicImageIterator<PIXELTYPE, ITERATOR>::operator()(int, int) const': ../../vigra/basicimage.hxx:437: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `const PIXELTYPE* vigra::ConstBasicImageIterator<PIXELTYPE, ITERATOR>::operator[](int) const': ../../vigra/basicimage.hxx:442: error: `y' undeclared (first use this function) ../../vigra/basicimage.hxx:442: error: `x' undeclared (first use this function) ../../vigra/basicimage.hxx: In member function `const PIXELTYPE* vigra::ConstBasicImageIterator<PIXELTYPE, ITERATOR>::rowIterator() const': ../../vigra/basicimage.hxx:446: error: there are no arguments to `current' that depend on a template parameter, so a declaration of `current' must be available ../../vigra/basicimage.hxx: In member function `vigra::IteratorAdaptor<vigra::LineBasedColumnIteratorPolicy<vigra::ConstBasicImageIterator<PIXELTYPE, ITERATOR> > > vigra::ConstBasicImageIterator<PIXELTYPE, ITERATOR>::columnIterator() const': ../../vigra/basicimage.hxx:451: error: there are no arguments to `line' that depend on a template parameter, so a declaration of `line' must be available ../../vigra/basicimage.hxx:451: error: `x' undeclared (first use this function) In file included from ../../vigra/iteratortraits.hxx:27, from ../../vigra/stdimage.hxx:28, from ../../vigra/edgedetection.hxx:31, from firstvigramodule.cpp:4: ../../vigra/accessor.hxx: In member function `std::pair<typename Acc1::value_type, typename Acc2::value_type> vigra::MultiImageAccessor2<Iter1, Acc1, Iter2, Acc2>::operator()(DIFFERENCE) const': ../../vigra/accessor.hxx:951: error: `i' undeclared (first use this function) In file included from ../../vigra/stdimage.hxx:30, from ../../vigra/edgedetection.hxx:31, from firstvigramodule.cpp:4: ../../vigra/rgbvalue.hxx: In member function `VALUETYPE& vigra::RGBValue<VALUETYPE>::red()': ../../vigra/rgbvalue.hxx:161: error: `data_' undeclared (first use this function) ../../vigra/rgbvalue.hxx: In member function `VALUETYPE& vigra::RGBValue<VALUETYPE>::green()': ../../vigra/rgbvalue.hxx:165: error: `data_' undeclared (first use this function) ../../vigra/rgbvalue.hxx: In member function `VALUETYPE& vigra::RGBValue<VALUETYPE>::blue()': ../../vigra/rgbvalue.hxx:169: error: `data_' undeclared (first use this function) ../../vigra/rgbvalue.hxx: In member function `const VALUETYPE& vigra::RGBValue<VALUETYPE>::red() const': ../../vigra/rgbvalue.hxx:173: error: `data_' undeclared (first use this function) ../../vigra/rgbvalue.hxx: In member function `const VALUETYPE& vigra::RGBValue<VALUETYPE>::green() const': ../../vigra/rgbvalue.hxx:177: error: `data_' undeclared (first use this function) ../../vigra/rgbvalue.hxx: In member function `const VALUETYPE& vigra::RGBValue<VALUETYPE>::blue() const': ../../vigra/rgbvalue.hxx:181: error: `data_' undeclared (first use this function) ../../vigra/rgbvalue.hxx: In member function `void vigra::RGBValue<VALUETYPE>::setRed(V)': ../../vigra/rgbvalue.hxx:206: error: `data_' undeclared (first use this function) ../../vigra/rgbvalue.hxx: In member function `void vigra::RGBValue<VALUETYPE>::setGreen(V)': ../../vigra/rgbvalue.hxx:212: error: `data_' undeclared (first use this function) ../../vigra/rgbvalue.hxx: In member function `void vigra::RGBValue<VALUETYPE>::setBlue(V)': ../../vigra/rgbvalue.hxx:218: error: `data_' undeclared (first use this function) In file included from ../../vigra/edgedetection.hxx:34, from firstvigramodule.cpp:4: ../../vigra/separableconvolution.hxx: In member function `void vigra::Kernel1D<ARITHTYPE>::initAveraging(int, ARITHTYPE)': ../../vigra/separableconvolution.hxx:1537: error: `i' undeclared (first use this function)
I assume you compiled your testcase with gcc 3.3, which doesn't have my fix. I looked at the assembly output and I found the problem. We are generating .section .gnu.linkonce.t.foo ... .L1: ... .L2: ... .L3: ... .L4: ... jmp *.L5(,%esi,4) .section .rodata .align 4 .align 4 .L5: .long .L1 .long .L2 .long .L3 .long .L4 Now if .gnu.linkonce.t.foo is discarded, we have undefined references in .rodata. One way to solve it is not to use .rodata. I think the best way to solve it is to use comdat group. BTW, I think you should open a new bug report and provide a testcase for gcc 3.4.
A patch is posted at http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00838.html
Reopening for now.
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: pinskia@gcc.gnu.org 2004-07-12 22:26:39 Modified files: gcc/cp : ChangeLog rtti.c Log message: 2004-07-12 Andrew Pinski <apinski@apple.com> PR c++/16475 Revert: 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> PR c++/16276 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo is not public. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.131&r2=1.3892.2.132 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.176.4.4&r2=1.176.4.5
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Changes by: pinskia@gcc.gnu.org 2004-07-12 22:28:54 Modified files: gcc/cp : ChangeLog rtti.c Log message: 2004-07-12 Andrew Pinski <apinski@apple.com> PR c++/16475 Revert: 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> PR c++/16276 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo is not public. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4193&r2=1.4194 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&r1=1.187&r2=1.188
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Changes by: jakub@gcc.gnu.org 2004-08-12 13:57:05 Modified files: gcc : ChangeLog varasm.c output.h target-def.h final.c target.h gcc/testsuite : ChangeLog gcc/config/mcore: mcore.c gcc/config/ip2k: ip2k.c gcc/config/rs6000: xcoff.h gcc/config/alpha: alpha.c gcc/config/i386: i386-interix.h cygming.h gcc/config/arm : pe.h gcc/config/avr : avr.c gcc/config : darwin.h gcc/doc : tm.texi Added files: gcc/testsuite/g++.old-deja/g++.other: comdat4-aux.cc comdat4.C Log message: PR c++/16276 * output.h (default_function_rodata_section, default_no_function_rodata_section): New prototypes. * target.h (struct gcc_target): Add asm_out.function_rodata_section. * target-def.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Define. (TARGET_ASM_OUT): Add it. * varasm.c (default_function_rodata_section, default_no_function_rodata_section): New functions. * final.c (final_scan_insn): Call targetm.asm_out.function_rodata_section instead of readonly_data_section. * config/darwin.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Define. * config/mcore/mcore.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/ip2k/ip2k.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/rs6000/xcoff.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/alpha/alpha.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/i386/cygming.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/i386/i386-interix.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/arm/pe.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/avr/avr.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * doc/tm.texi (TARGET_ASM_FUNCTION_RODATA_SECTION): Document. * g++.old-deja/g++.other/comdat4.C: New test. * g++.old-deja/g++.other/comdat4-aux.cc: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4878&r2=2.4879 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&r1=1.438&r2=1.439 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/output.h.diff?cvsroot=gcc&r1=1.142&r2=1.143 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/target-def.h.diff?cvsroot=gcc&r1=1.92&r2=1.93 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/final.c.diff?cvsroot=gcc&r1=1.326&r2=1.327 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/target.h.diff?cvsroot=gcc&r1=1.104&r2=1.105 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4124&r2=1.4125 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mcore/mcore.c.diff?cvsroot=gcc&r1=1.68&r2=1.69 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ip2k/ip2k.c.diff?cvsroot=gcc&r1=1.39&r2=1.40 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/xcoff.h.diff?cvsroot=gcc&r1=1.52&r2=1.53 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/alpha.c.diff?cvsroot=gcc&r1=1.381&r2=1.382 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386-interix.h.diff?cvsroot=gcc&r1=1.49&r2=1.50 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/cygming.h.diff?cvsroot=gcc&r1=1.17&r2=1.18 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/pe.h.diff?cvsroot=gcc&r1=1.26&r2=1.27 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/avr/avr.c.diff?cvsroot=gcc&r1=1.118&r2=1.119 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/darwin.h.diff?cvsroot=gcc&r1=1.88&r2=1.89 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/tm.texi.diff?cvsroot=gcc&r1=1.353&r2=1.354 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/comdat4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
Fixed in 3.5.0. But it seems like this needs to be fixed in 3.4.0 also but I want to say the patch here is too big for the release branch, Mark?
Subject: Re: [3.4 only] G++ generates local references to linkonce sections pinskia at gcc dot gnu dot org wrote: >------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-12 14:38 ------- >Fixed in 3.5.0. But it seems like this needs to be fixed in 3.4.0 also but I want to say the patch here is >too big for the release branch, Mark? > > Actually, it looks OK to me -- if someone will backport it and test it.
Postponed until GCC 3.4.3.
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-rhl-branch Changes by: jakub@gcc.gnu.org 2004-09-01 15:48:02 Modified files: gcc : ChangeLog final.c output.h target-def.h target.h varasm.c gcc/config/alpha: alpha.c gcc/config/arm : pe.h gcc/config/avr : avr.c gcc/config/i386: cygming.h i386-interix.h gcc/config/ip2k: ip2k.c gcc/config/mcore: mcore.c gcc/config/rs6000: xcoff.h gcc/doc : tm.texi gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.old-deja/g++.other: comdat4-aux.cc comdat4.C Log message: PR c++/16276 * output.h (default_function_rodata_section, default_no_function_rodata_section): New prototypes. * target.h (struct gcc_target): Add asm_out.function_rodata_section. * target-def.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Define. (TARGET_ASM_OUT): Add it. * varasm.c (default_function_rodata_section, default_no_function_rodata_section): New functions. * final.c (final_scan_insn): Call targetm.asm_out.function_rodata_section instead of readonly_data_section. * config/mcore/mcore.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Define. * config/ip2k/ip2k.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/rs6000/xcoff.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/alpha/alpha.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/i386/cygming.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/i386/i386-interix.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/arm/pe.h (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * config/avr/avr.c (TARGET_ASM_FUNCTION_RODATA_SECTION): Likewise. * doc/tm.texi (TARGET_ASM_FUNCTION_RODATA_SECTION): Document. * g++.old-deja/g++.other/comdat4.C: New test. * g++.old-deja/g++.other/comdat4-aux.cc: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=2.2326.2.399.2.29&r2=2.2326.2.399.2.30 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/final.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.304.4.2&r2=1.304.4.2.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/output.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.133.10.2&r2=1.133.10.2.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/target-def.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.63.4.2.2.1&r2=1.63.4.2.2.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/target.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.74.2.3.2.1&r2=1.74.2.3.2.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.405.2.3&r2=1.405.2.3.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/alpha/alpha.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.342.4.8.2.2&r2=1.342.4.8.2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/pe.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.23.6.1&r2=1.23.6.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/avr/avr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.108.4.2&r2=1.108.4.2.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/cygming.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.11.4.1.2.1&r2=1.11.4.1.2.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386-interix.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.47.4.1&r2=1.47.4.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ip2k/ip2k.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.29.4.1&r2=1.29.4.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mcore/mcore.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.55.4.1&r2=1.55.4.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/xcoff.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.51.4.1&r2=1.51.4.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/tm.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.281.2.13.2.3&r2=1.281.2.13.2.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.3389.2.170.2.15&r2=1.3389.2.170.2.16 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=NONE&r2=1.1.8.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/comdat4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=NONE&r2=1.1.8.1
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-rhl-branch Changes by: jakub@gcc.gnu.org 2004-09-01 15:51:34 Modified files: gcc : ChangeLog gcc/cp : rtti.c gcc/testsuite : ChangeLog gcc/testsuite/g++.dg/rtti: tinfo1.C Log message: 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> PR c++/16276 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo is not public. 2004-08-18 Jakub Jelinek <jakub@redhat.com> Revert: 2004-07-27 Andrew Pinski <apinski@apple.com> * g++.dg/rtti/tinfo1.C: Correct the xfail. 2004-07-26 Andrew Pinski <apinski@apple.com> * g++.dg/rtti/tinfo1.C: Xfail. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=2.2326.2.399.2.30&r2=2.2326.2.399.2.31 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.176.4.3&r2=1.176.4.3.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.3389.2.170.2.16&r2=1.3389.2.170.2.17 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/rtti/tinfo1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.1.6.2&r2=1.1.6.3
The patch referenced via an url to gcc-patches is wrong, someone needs to find the one which was applied to fix the problem and back port it to 3.4.
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-rhl-branch Changes by: jakub@gcc.gnu.org 2004-10-29 12:59:56 Modified files: gcc : ChangeLog final.c output.h varasm.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.old-deja/g++.other: comdat4-aux.cc comdat4.C Log message: PR c++/16276 * output.h (function_readonly_data_section): New prototype. * varasm.c (function_readonly_data_section): New function. * final.c (final_scan_insn): Call it instead of readonly_data_section. * g++.old-deja/g++.other/comdat4.C: New test. * g++.old-deja/g++.other/comdat4-aux.cc: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.16114.2.523.2.114&r2=1.16114.2.523.2.115 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/final.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.271.2.1.4.2&r2=1.271.2.1.4.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/output.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.116.6.1&r2=1.116.6.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.324.2.4.2.10&r2=1.324.2.4.2.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.2261.2.170.2.62&r2=1.2261.2.170.2.63 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=NONE&r2=1.1.32.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/comdat4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=NONE&r2=1.1.32.1
Subject: Bug 16276 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-rhl-branch Changes by: jakub@gcc.gnu.org 2004-10-29 13:03:55 Modified files: gcc : ChangeLog gcc/cp : rtti.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/rtti: tinfo1.C Log message: 2004-07-07 H.J. Lu <hongjiu.lu@intel.com> PR c++/16276 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo is not public. PR c++/16276 * g++.dg/rtti/tinfo1.C: New file. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.16114.2.523.2.115&r2=1.16114.2.523.2.116 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.146.2.1.2.2&r2=1.146.2.1.2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=1.2261.2.170.2.63&r2=1.2261.2.170.2.64 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/rtti/tinfo1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-rhl-branch&r1=NONE&r2=1.3.28.1
Postponed until GCC 3.4.4.
An updated patch for gcc 3.4 is posted at http://gcc.gnu.org/ml/gcc-patches/2004-12/msg00276.html
Fixed in 4.0 and up. Won't fix for 3.4.6.