Re: [PATCH] Fix possible alignment issue with dw2-dir-file-name test case

Andreas Arnez
2014-01-10T14:30:57Z

On Fri, Jan 10 2014, Pedro Alves wrote:

> On 01/08/2014 06:00 PM, Andreas Arnez wrote:
>> Since upstream gcc has recently increased the function alignment on
>> S390, the dw2-dir-file-name test case fails in the first
>> gdb_continue_to_breakpoint. Indeed, the breakpoint is now placed into
>> the alignment gap *before* the actual function.
>>
>> This happens because the test case declares the respective "*_start"
>> symbol as a "loose" label before the function definition, and the
>> compiler inserts the alignment between that label and the function
>> itself. The fix defines the "*_start" symbol as a global alias to the
>> function instead.
>
> It seems the _start symbol only needs to exist because
> the functions were declared static:
>
>> -#define FUNC(name) \
>> - asm (#name "_start: .globl " #name "_start\n"); \
>> - static void \
>> - name (void) \
>
> But I see nothing that needs them to be static. This
> seems simpler to me:

It's certainly simpler. Maybe Jan can explain why the functions had
been declared static?

Your patch fixes the FAILs for me, so if there's no reason for the
static-ness, then I agree we should go with that.