This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix failure of gfortran.dg/backtrace_1.f90 on hppa*-*-hpux*
- From: Jerry DeLisle <jvdelisle at charter dot net>
- To: John David Anglin <dave dot anglin at bell dot net>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, fortran at gcc dot gnu dot org
- Date: Sat, 23 Jan 2016 15:12:51 -0800
- Subject: Re: [PATCH] Fix failure of gfortran.dg/backtrace_1.f90 on hppa*-*-hpux*
- Authentication-results: sourceware.org; auth=none
- References: <DD7394A3-7E09-41F7-9809-CB0EEC81F65A at bell dot net> <C194690B-6CF6-476E-986C-4EC1A4B5A953 at bell dot net>
On 01/23/2016 02:40 PM, John David Anglin wrote:
> Ping.
>
> On 2015-12-28, at 2:58 PM, John David Anglin wrote:
>
>> The hppa*-*-hpux* target does not support __sync builtins. As a result, libbacktrace does not
>> support backtraces when threads are active.
>>
>> Instead of always assuming threads are active in libgfortran/runtime/backtrace.c, the attached
>> patch uses __gthread_active_p() to determine whether threads are active or not. In addition,
>> if backtrace_create_state returns NULL, we just return from show_backtrace(). This avoids a
>> segmentation fault when threads are active.
>>
>> This fixes the failure of gfortran.dg/backtrace_1.f90 on hpux.
>>
>> Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.
>>
>> Okay for trunk?
>>
OK,
Jerry