public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29390]  New: Bogus symbol inserted into valid C++ code at low optimization level
@ 2006-10-08 20:48 mi at aldan dot algebra dot com
  2006-10-08 20:50 ` [Bug c++/29390] " mi at aldan dot algebra dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-08 20:48 UTC (permalink / raw)
  To: gcc-bugs

When trying to build ICU-3.6 with low optimization, one of the object files
grows a bogus symbol, which can not, of course, be resolved at the link time.

loctest.o(.data+0x51c):/misha/ports/devel/icu/work/icu/source/test/intltest/loctest.cpp:181:
undefined reference to `.LC786'
loctest.o(.data+0x520):/misha/ports/devel/icu/work/icu/source/test/intltest/loctest.cpp:181:
undefined reference to `.LC786'

The post-pre-processed loctest.ii will be attached to this report.


-- 
           Summary: Bogus symbol inserted into valid C++ code at low
                    optimization level
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mi at aldan dot algebra dot com


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


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

* [Bug c++/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
@ 2006-10-08 20:50 ` mi at aldan dot algebra dot com
  2006-10-08 20:52 ` mi at aldan dot algebra dot com
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-08 20:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from mi at aldan dot algebra dot com  2006-10-08 20:50 -------
Created an attachment (id=12396)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12396&action=view)
The result of preprocessing of ICU's icu/source/test/intltest/loctest.cpp


-- 


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


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

* [Bug c++/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
  2006-10-08 20:50 ` [Bug c++/29390] " mi at aldan dot algebra dot com
@ 2006-10-08 20:52 ` mi at aldan dot algebra dot com
  2006-10-08 20:55 ` [Bug middle-end/29390] " pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-08 20:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mi at aldan dot algebra dot com  2006-10-08 20:52 -------
Sorry, I forgot to explicitly specify, that the bogus symbol is seen, when
compiling at either -O0 or -O1 levels (symbol name and the line number, where
it, supposedly, appears, change).

Compiling at -O2 does not exhibit the problem.


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (2 preceding siblings ...)
  2006-10-08 20:55 ` [Bug middle-end/29390] " pinskia at gcc dot gnu dot org
@ 2006-10-08 20:55 ` pinskia at gcc dot gnu dot org
  2006-10-08 21:10 ` mi at aldan dot algebra dot com
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-08 20:55 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
  2006-10-08 20:50 ` [Bug c++/29390] " mi at aldan dot algebra dot com
  2006-10-08 20:52 ` mi at aldan dot algebra dot com
@ 2006-10-08 20:55 ` pinskia at gcc dot gnu dot org
  2006-10-08 20:55 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-08 20:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-10-08 20:55 -------
What target are you compiling for?


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (3 preceding siblings ...)
  2006-10-08 20:55 ` pinskia at gcc dot gnu dot org
@ 2006-10-08 21:10 ` mi at aldan dot algebra dot com
  2006-10-08 21:13 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-08 21:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mi at aldan dot algebra dot com  2006-10-08 21:10 -------
I'm compiling on and for FreeBSD/i386.

Regarding the major-normal downgrade, I must note, that other (also
compiler-related, apparently) problems in ICU require the ability to run the
tests under debugger, which is rather difficult, when the code is built with
-O2...

Thanks!


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (4 preceding siblings ...)
  2006-10-08 21:10 ` mi at aldan dot algebra dot com
@ 2006-10-08 21:13 ` pinskia at gcc dot gnu dot org
  2006-10-08 21:54 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-08 21:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-10-08 21:13 -------
(In reply to comment #4)
> Regarding the major-normal downgrade.
The main reason why I did that is because 3.4.x is no longer being maintained
so it might just be better to use 4.0.3.


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (5 preceding siblings ...)
  2006-10-08 21:13 ` pinskia at gcc dot gnu dot org
@ 2006-10-08 21:54 ` pinskia at gcc dot gnu dot org
  2006-10-09  4:42 ` mi at aldan dot algebra dot com
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-08 21:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-10-08 21:53 -------
This works fine on 4.0.4 so closing as fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.4


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (6 preceding siblings ...)
  2006-10-08 21:54 ` pinskia at gcc dot gnu dot org
@ 2006-10-09  4:42 ` mi at aldan dot algebra dot com
  2006-10-09  4:45 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-09  4:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mi at aldan dot algebra dot com  2006-10-09 04:42 -------
3.4.4 (or 3.4.6) are the system compilers on FreeBSD-5.x and FreeBSD-6.x

Would it be possible to locate the diff, that fixed the problem, so it can be
merged into our toolchain? Thanks!


-- 

mi at aldan dot algebra dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (7 preceding siblings ...)
  2006-10-09  4:42 ` mi at aldan dot algebra dot com
@ 2006-10-09  4:45 ` pinskia at gcc dot gnu dot org
  2006-10-10  3:26 ` bangerth at dealii dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-09  4:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2006-10-09 04:45 -------
(In reply to comment #7)
> 3.4.4 (or 3.4.6) are the system compilers on FreeBSD-5.x and FreeBSD-6.x
So what, we are talking about the FSF GCC and not freebsd and 3.4.x is no
longer maintained by the FSF.

> Would it be possible to locate the diff, that fixed the problem, so it can be
> merged into our toolchain? Thanks!

We could but that is doing the same thing as supporting an older compiler which
we don't have the resources to do this.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (8 preceding siblings ...)
  2006-10-09  4:45 ` pinskia at gcc dot gnu dot org
@ 2006-10-10  3:26 ` bangerth at dealii dot org
  2006-10-10 14:53 ` mi at aldan dot algebra dot com
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: bangerth at dealii dot org @ 2006-10-10  3:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bangerth at dealii dot org  2006-10-10 03:26 -------
(In reply to comment #8)
> (In reply to comment #7)
> > 3.4.4 (or 3.4.6) are the system compilers on FreeBSD-5.x and FreeBSD-6.x
> So what, we are talking about the FSF GCC and not freebsd and 3.4.x is no
> longer maintained by the FSF.

Maybe slightly more diplomatic than Andrew's answer: we try to maintain current
development mainline + two older release branches (presently 4.0.x and 4.1.x).
Our limited resources do not allow to support older releases.

That said, since you have access to a FreeBSD system, finding the relevant
patch using a binary search of the subversion archive between the revision
numbers of the 3.4 branchpoint and the 4.0 release shouldn't be too hard.
Of course, whether the relevant patch applies cleanly is another matter.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (9 preceding siblings ...)
  2006-10-10  3:26 ` bangerth at dealii dot org
@ 2006-10-10 14:53 ` mi at aldan dot algebra dot com
  2006-10-10 14:57 ` bangerth at dealii dot org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-10 14:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from mi at aldan dot algebra dot com  2006-10-10 14:52 -------
(In reply to comment #9)
> finding the relevant patch using a binary search of the subversion archive
> between the revision numbers of the 3.4 branchpoint and the 4.0 release

That's the problem -- how can I, who has never seen the internals of the GNU
compiler, figure out, which patch is "the relevant" one?

For you, the developers, it is, probably, indeed faster, than writing another
explanation, why you "have no resources" to do it...


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (10 preceding siblings ...)
  2006-10-10 14:53 ` mi at aldan dot algebra dot com
@ 2006-10-10 14:57 ` bangerth at dealii dot org
  2006-10-10 15:13 ` mi at aldan dot algebra dot com
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: bangerth at dealii dot org @ 2006-10-10 14:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from bangerth at dealii dot org  2006-10-10 14:56 -------
(In reply to comment #10)
> For you, the developers, it is, probably, indeed faster, than writing another
> explanation, why you "have no resources" to do it...

No, it will actually take significant time, since one has to do lots of
bootstraps. We as a group decided that our time would be better spent on
maintaining 2 release branches + one development mainline.

But that aside, it's just a matter of fact that very few of
us actually have FreeBSD systems we could try this on.

W.


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (11 preceding siblings ...)
  2006-10-10 14:57 ` bangerth at dealii dot org
@ 2006-10-10 15:13 ` mi at aldan dot algebra dot com
  2006-10-10 15:18 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-10 15:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from mi at aldan dot algebra dot com  2006-10-10 15:13 -------
In comment #9: shouldn't be too hard.
In comment #11: No, it will actually take significant time

If the explanation for the above discrepancy is simply not having access to a
FreeBSD machine, such an access can be arranged in an hour or so.

Just send me (by private e-mail) your ssh public key (~/.ssh/id_dsa.pub) and
the /etc/passwd line for your account information (without the actual
password). Thanks!


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (12 preceding siblings ...)
  2006-10-10 15:13 ` mi at aldan dot algebra dot com
@ 2006-10-10 15:18 ` bangerth at dealii dot org
  2006-10-11 17:15 ` mi at aldan dot algebra dot com
  2006-10-11 19:39 ` mi at aldan dot algebra dot com
  15 siblings, 0 replies; 17+ messages in thread
From: bangerth at dealii dot org @ 2006-10-10 15:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from bangerth at dealii dot org  2006-10-10 15:18 -------
(In reply to comment #12)
> In comment #9: shouldn't be too hard.
> In comment #11: No, it will actually take significant time

It's a long and boring process. It's not complicated, it just takes time.


> If the explanation for the above discrepancy is simply not having access to a
> FreeBSD machine, such an access can be arranged in an hour or so.

No, you don't understand. I have no intention of doing this. I believe my time
is better spent working on bugs that haven't been fixed on any current
release branch yet. I have no interest in working on things that have been
sorted out long ago. If you really want to see this fixed, you will have to
find a volunteer who is willing to spend the necessary time and who has
access to the relevant machines. That's just not me, sorry.

W.


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (13 preceding siblings ...)
  2006-10-10 15:18 ` bangerth at dealii dot org
@ 2006-10-11 17:15 ` mi at aldan dot algebra dot com
  2006-10-11 19:39 ` mi at aldan dot algebra dot com
  15 siblings, 0 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-11 17:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from mi at aldan dot algebra dot com  2006-10-11 17:15 -------
Ok, the problem is triggered by the ``-march=pentium4'' flag:

c++ -O0 -g -c -fno-strict-aliasing -pipe -march=pentium4 loctest.ii
mteterin@mi:source/test/intltest (1127) nm loctest.o | grep LC
         U .LC786
         U _ZNK7icu_3_66Locale7getLCIDEv

vs.

c++ -O0 -g -c -fno-strict-aliasing -pipe loctest.ii
mteterin@mi:source/test/intltest (1129) nm loctest.o | grep LC
         U _ZNK7icu_3_66Locale7getLCIDEv


Would this narrow the search for a fix down enough?

The problem does not exist with the gcc-3.2.3 (tested on RedHat), nor with
gcc-3.4.1 (tested on the same FreeBSD box as the originally reported 3.4.4).


-- 


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


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

* [Bug middle-end/29390] Bogus symbol inserted into valid C++ code at low optimization level
  2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
                   ` (14 preceding siblings ...)
  2006-10-11 17:15 ` mi at aldan dot algebra dot com
@ 2006-10-11 19:39 ` mi at aldan dot algebra dot com
  15 siblings, 0 replies; 17+ messages in thread
From: mi at aldan dot algebra dot com @ 2006-10-11 19:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from mi at aldan dot algebra dot com  2006-10-11 19:38 -------
Removing either the line 16037 or the 15167 in the loctest.ii gets rid of the
problem.

The lines both reference a string literal ("en_GB_EURO"), thus the bug, likely,
has something to do with how the identical literals are herded together by
3.4.x on either pentium3 or pentium4 (but not pentium2)...


-- 


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


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

end of thread, other threads:[~2006-10-11 19:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-08 20:48 [Bug c++/29390] New: Bogus symbol inserted into valid C++ code at low optimization level mi at aldan dot algebra dot com
2006-10-08 20:50 ` [Bug c++/29390] " mi at aldan dot algebra dot com
2006-10-08 20:52 ` mi at aldan dot algebra dot com
2006-10-08 20:55 ` [Bug middle-end/29390] " pinskia at gcc dot gnu dot org
2006-10-08 20:55 ` pinskia at gcc dot gnu dot org
2006-10-08 21:10 ` mi at aldan dot algebra dot com
2006-10-08 21:13 ` pinskia at gcc dot gnu dot org
2006-10-08 21:54 ` pinskia at gcc dot gnu dot org
2006-10-09  4:42 ` mi at aldan dot algebra dot com
2006-10-09  4:45 ` pinskia at gcc dot gnu dot org
2006-10-10  3:26 ` bangerth at dealii dot org
2006-10-10 14:53 ` mi at aldan dot algebra dot com
2006-10-10 14:57 ` bangerth at dealii dot org
2006-10-10 15:13 ` mi at aldan dot algebra dot com
2006-10-10 15:18 ` bangerth at dealii dot org
2006-10-11 17:15 ` mi at aldan dot algebra dot com
2006-10-11 19:39 ` mi at aldan dot algebra dot com

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).