[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-06 Thread jakub at gcc dot gnu dot org
--- Comment #45 from jakub at gcc dot gnu dot org 2007-11-06 15:14 --- Fixed. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Status|NEW

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-05 Thread hjl at lucon dot org
--- Comment #42 from hjl at lucon dot org 2007-11-05 14:18 --- (In reply to comment #39) Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 04/11/2007, at 7:01 PM, hjl at lucon dot org wrote: - Won't this cause the global variable

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-05 Thread hjl at lucon dot org
--- Comment #43 from hjl at lucon dot org 2007-11-05 19:25 --- A patch is posted at http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00214.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-05 Thread hjl at gcc dot gnu dot org
--- Comment #44 from hjl at gcc dot gnu dot org 2007-11-05 23:12 --- Subject: Bug 33871 Author: hjl Date: Mon Nov 5 23:11:57 2007 New Revision: 129911 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129911 Log: 2007-11-05 H.J. Lu [EMAIL PROTECTED] PR c++/33871

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread geoffk at geoffk dot org
--- Comment #30 from geoffk at geoffk dot org 2007-11-04 07:50 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 03/11/2007, at 7:21 AM, hjl at lucon dot org wrote: Local symbols should only be referenced within the same comdat group

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread hjl at lucon dot org
--- Comment #31 from hjl at lucon dot org 2007-11-04 14:40 --- (In reply to comment #30) Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 03/11/2007, at 7:21 AM, hjl at lucon dot org wrote: Local symbols should only be referenced

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread geoffk at geoffk dot org
--- Comment #32 from geoffk at geoffk dot org 2007-11-05 00:14 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 04/11/2007, at 6:40 AM, hjl at lucon dot org wrote: --- Comment #31 from hjl at lucon dot org 2007-11-04 14:40

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread hjl at lucon dot org
--- Comment #33 from hjl at lucon dot org 2007-11-05 00:22 --- (In reply to comment #32) What if you want to reference this string from somewhere that should never be discarded, like a global variable? Since the string is local, that global variable is defined in the same file

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread hjl at lucon dot org
--- Comment #34 from hjl at lucon dot org 2007-11-05 00:32 --- (In reply to comment #33) (In reply to comment #32) What if you want to reference this string from somewhere that should never be discarded, like a global variable? Since the string is local, that global

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread geoffk at geoffk dot org
--- Comment #35 from geoffk at geoffk dot org 2007-11-05 02:47 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 04/11/2007, at 4:22 PM, hjl at lucon dot org wrote: --- Comment #33 from hjl at lucon dot org 2007-11-05 00:22

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread hjl at lucon dot org
--- Comment #36 from hjl at lucon dot org 2007-11-05 02:50 --- The rules for the comdat group are 1. There should be no outside references to local symbols inside of the comdat group. 2. All comdat groups with the same signature should have the identical set of defined global symbols.

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread mmitchel at gcc dot gnu dot org
-- mmitchel at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread hjl at lucon dot org
--- Comment #37 from hjl at lucon dot org 2007-11-05 03:01 --- (In reply to comment #35) - What if the global variable references two or more strings? All local strings referenced by the global variable should be in the same comdat group. - Won't this cause the global variable to

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread hjl at lucon dot org
--- Comment #38 from hjl at lucon dot org 2007-11-05 03:03 --- (In reply to comment #37) (In reply to comment #35) - What if the global variable references two or more strings? All local strings referenced by the global variable should be in the same comdat group. It

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread geoffk at geoffk dot org
--- Comment #39 from geoffk at geoffk dot org 2007-11-05 03:33 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 04/11/2007, at 7:01 PM, hjl at lucon dot org wrote: - Won't this cause the global variable to be discarded if anyone

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-04 Thread amodra at bigpond dot net dot au
--- Comment #41 from amodra at bigpond dot net dot au 2007-11-05 04:45 --- In reply to #27, I'm reasonably happy with the idea of ld treating a zero offset into a discarded section as special. I'd also happily approve a patch that allowed relocations with addends against any local

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-03 Thread geoffk at geoffk dot org
--- Comment #27 from geoffk at geoffk dot org 2007-11-03 07:21 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 30/10/2007, at 9:03 PM, amodra at bigpond dot net dot au wrote: --- Comment #26 from amodra at bigpond dot net dot au

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-03 Thread gcc at magfr dot user dot lysator dot liu dot se
--- Comment #28 from gcc at magfr dot user dot lysator dot liu dot se 2007-11-03 07:47 --- That both files are named S1.C doesn't matter. If one do cp S1.C S2.C g++ -c S1.C g++ -c S2.C g++ S1.o S2.o one get the same behaviour and the same linker error. --

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-11-03 Thread hjl at lucon dot org
--- Comment #29 from hjl at lucon dot org 2007-11-03 14:21 --- (In reply to comment #27) In this case, though, the contents of the linkonce section will never actually differ; and I believe in this case the offset is zero, so even if they did differ it would not matter. Perhaps

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread gcc at magfr dot user dot lysator dot liu dot se
--- Comment #15 from gcc at magfr dot user dot lysator dot liu dot se 2007-10-30 16:53 --- I agree that the linker should not drop the typeinfo when it is needed. I could just tell that I see the problem on Linux so it isn't Darwin-specific. Should the typeinfo for an anonymous

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread rguenth at gcc dot gnu dot org
--- Comment #16 from rguenth at gcc dot gnu dot org 2007-10-30 18:07 --- Geoff, your patch changed the typeinfo symbols for anonymous namespaces from having weak linkage to non-weak linkage. This caused the regression. Do you argue this change was deliberate and is the right thing?

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread geoffk at geoffk dot org
--- Comment #17 from geoffk at geoffk dot org 2007-10-30 18:31 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 30/10/2007, at 9:53 AM, gcc at magfr dot user dot lysator dot liu dot se wrote: If that is the case, what should

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread rguenther at suse dot de
--- Comment #19 from rguenther at suse dot de 2007-10-30 18:44 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On Tue, 30 Oct 2007, geoffk at geoffk dot org wrote: On 30/10/2007, at 11:07 AM, rguenth at gcc dot gnu dot org wrote:

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread rguenth at gcc dot gnu dot org
--- Comment #20 from rguenth at gcc dot gnu dot org 2007-10-30 18:50 --- I guess re-evaluating if this is a binutils bug then is required? Do we also need to bump the minimal binutils version requirement for 4.3 if so? -- rguenth at gcc dot gnu dot org changed: What

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread geoffk at geoffk dot org
--- Comment #18 from geoffk at geoffk dot org 2007-10-30 18:35 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 30/10/2007, at 11:07 AM, rguenth at gcc dot gnu dot org wrote: --- Comment #16 from rguenth at gcc dot gnu dot org

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread geoffk at geoffk dot org
--- Comment #21 from geoffk at geoffk dot org 2007-10-30 19:04 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 30/10/2007, at 11:44 AM, rguenther at suse dot de wrote: I see. So where is the bug here? We obviously see application

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread hjl at lucon dot org
--- Comment #22 from hjl at lucon dot org 2007-10-30 19:12 --- The problem is typeinfo for (anonymous namespace)::t in .rodata section references typeinfo name for (anonymous namespace)::t in a comdat section. When the comdat section is discarded, we got a problem. Can we put typeinfo

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread geoffk at geoffk dot org
--- Comment #23 from geoffk at geoffk dot org 2007-10-30 19:32 --- Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 30/10/2007, at 12:12 PM, hjl at lucon dot org wrote: The problem is typeinfo for (anonymous namespace)::t in .rodata

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread hjl at lucon dot org
--- Comment #24 from hjl at lucon dot org 2007-10-30 19:36 --- (In reply to comment #23) Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in discarded section On 30/10/2007, at 12:12 PM, hjl at lucon dot org wrote: The problem is typeinfo for (anonymous

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread hjl at lucon dot org
--- Comment #25 from hjl at lucon dot org 2007-10-30 19:37 --- Basically, you can't have a non-comdat section references a local symbol in a comdat section. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-30 Thread amodra at bigpond dot net dot au
--- Comment #26 from amodra at bigpond dot net dot au 2007-10-31 04:03 --- I believe the linker is correct to reject relocations against local symbols in discarded sections. The reason being that the linker allows linkonce (and comdat group) section contents to differ between two

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-29 Thread rguenth at gcc dot gnu dot org
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Keywords||ABI, wrong-code Summary|typeinfo name referenced in |[4.3

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-29 Thread rguenth at gcc dot gnu dot org
--- Comment #8 from rguenth at gcc dot gnu dot org 2007-10-29 12:36 --- 125653 works, 125829 is broken. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-29 Thread rguenth at gcc dot gnu dot org
--- Comment #9 from rguenth at gcc dot gnu dot org 2007-10-29 13:17 --- Reverting r125721 | geoffk | 2007-06-14 22:56:25 +0200 (Thu, 14 Jun 2007) | 4 lines PR 31093 * decl2.c (determine_visibility): Remove duplicate code for handling type info. fixes this.

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-29 Thread rguenth at gcc dot gnu dot org
--- Comment #10 from rguenth at gcc dot gnu dot org 2007-10-29 13:22 --- The testcase that went in with this change still passes after reverting the change. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-29 Thread pinskia at gcc dot gnu dot org
--- Comment #12 from pinskia at gcc dot gnu dot org 2007-10-29 17:12 --- The typeinfo for anonymous namespace classes should be local. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-29 Thread gcc at magfr dot user dot lysator dot liu dot se
--- Comment #13 from gcc at magfr dot user dot lysator dot liu dot se 2007-10-29 18:52 --- Should the typeinfo for an anonymous namespace class be local if it inherits from a class that is outside the anonymous namespace? If that is the case, what should typeid(reference to base of

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section

2007-10-29 Thread geoffk at gcc dot gnu dot org
--- Comment #14 from geoffk at gcc dot gnu dot org 2007-10-30 03:44 --- I don't fully understand the linker error message. It seems to me that if there's a reference to the typeinfo name then that just means the linker shouldn't be discarding it. The original problem was encountered