[patch] PR debug/53948

Jakub Jelinek jakub@redhat.com
Wed Jul 18 19:01:00 GMT 2012


On Wed, Jul 18, 2012 at 08:55:17PM +0200, Jan Kratochvil wrote:
> On Wed, 18 Jul 2012 20:05:46 +0200, Steven Bosscher wrote:
> > I wouldn't know what to test for. Looking for a .loc marker seems a bit fragile.
> 
> What is fragile on
> // { dg-final { scan-assembler-times "\\.loc\t1 3 0\\r\\n\t\[^.\]" 6 } }
> 
> or something like that.  Line numbers are constant for the testcase.

Not all assemblers support .loc markers, sometimes .debug_line is emitted by
gcc directly, and not all targets use dwarf.  For the latter we can just put
the test into gcc.dg/debug/dwarf/, for the former we would need a new
dejagnu test.  But more importantly, on different arches I'd guess the
number of .loc times might be different.
Better than that would be a guality testcase limited to -O0.

	Jakub



More information about the Gcc-patches mailing list