This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to represent column numbers using source_location
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Per Bothner <per at bothner dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 17 Feb 2004 12:37:40 +0100
- Subject: Re: PATCH to represent column numbers using source_location
- References: <4029E414.9090902@bothner.com>
> I checked the attached patch into mainline.
> (After testing on Fedora with no regressions.)
> This was approved by Richard Henderson 12/29,
> when I originally suggested checking it into tree-ssa;
> it has been modified for mainline.
It broke bootstrap on SPARC/Solaris with the vendor compiler:
cc -xarch=v9 -erroff -g -DIN_GCC -DHAVE_CONFIG_H -DGENERATOR_FILE -o
gengtype \
gengtype.o gengtype-lex.o gengtype-yacc.o ../libiberty/libiberty.a
ild: (undefined symbol) linemap_line_start -- referenced in the text segment
of gengtype.o
I think this is caused by these bits in line-maps.h:
/* Get a source position that for the same line as the most recent
linemap_line_start, but with the specified TO_COLUMN column number. */
static inline source_location
linemap_position_for_column (struct line_maps *set, unsigned int to_column)
{
struct line_map *map = &set->maps[set->used - 1];
source_location r = set->highest_location;
if (__builtin_expect (to_column > set->max_column_hint, 0))
{
if (r >= 0xC000000 || to_column > 1000000) /* FIXME */
{
/* Running low on source_locations - disable column numbers. */
return r - SOURCE_COLUMN (map, r);
}
else
{
r = linemap_line_start (set, SOURCE_LINE (map, r), to_column + 50);
map = &set->maps[set->used - 1];
r = set->highest_location;
}
}
r = r - SOURCE_COLUMN (map, r) + to_column;
if (r >= set->highest_location)
set->highest_location = r;
return r;
}
You can bootstrap with '-fkeep-inline-functions' to reproduce the problem.
--
Eric Botcazou