Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Sep 2006 12:27:52 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        stable@freebsd.org, current@freebsd.org
Subject:   Mystery symbols made up by C++ at _low_ optimization levels
Message-ID:  <200609251227.52791.mi%2Bmx@aldan.algebra.com>

next in thread | raw e-mail | index | archive | help
Could someone with knowledge of compilers, please, look at the PR 103610?

	http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/103610


One of the source files, when compiled (with -O0 or -O1), grows a symbol, that 
is not referenced anywhere else... Depending on the optimizations, the symbol 
name and the line-number change from `.LC786' and 181 with -O0 below:

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

to `.LC779' and 185 with -O1...

Compiling with -O2 gets rid of the problem, but not everyone likes to do that.

I checked -- it does not come from any pre-processor magic. Any clues?

To reproduce, build the devel/icu port with -O1 and -g.

Thanks!

	-mi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609251227.52791.mi%2Bmx>