[Bug fortran/68744] FAIL: gfortran.dg/backtrace_1.f90 -O0 execution test

2015-12-12 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68744

--- Comment #7 from John David Anglin  ---
Created attachment 37012
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37012=edit
Patch

I don't expect this to work but it points at the problem.  The call to
backtrace_create_state() assumes threaded code.  backtrace_create_state()
returns NULL if HAVE_SYNC_FUNCTIONS is not defined.

[Bug fortran/68744] FAIL: gfortran.dg/backtrace_1.f90 -O0 execution test

2015-12-12 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68744

--- Comment #5 from John David Anglin  ---
(gdb) r
Starting program: /test/gnu/gcc/objdir/gcc/testsuite/gfortran/backtrace_1.exe 
warning: Private mapping of shared library text was not specified
by the executable; setting a breakpoint in a shared library which
is not privately mapped will not work.  See the HP-UX 11i v3 chatr
manpage for methods to privately map shared library text.

Could not print backtrace: backtrace library does not support threads

Program received signal SIGSEGV, Segmentation fault.
backtrace_alloc (state=state@entry=0x0, size=size@entry=4096, 
error_callback=error_callback@entry=0x0, data=data@entry=0x0)
at ../../../gcc/libbacktrace/mmap.c:102
102   if (!state->threaded)
(gdb) p state
$1 = (struct backtrace_state *) 0x0
(gdb) bt
#0  backtrace_alloc (state=state@entry=0x0, size=size@entry=4096, 
error_callback=error_callback@entry=0x0, data=data@entry=0x0)
at ../../../gcc/libbacktrace/mmap.c:102
#1  0xc03438b0 in backtrace_full (state=state@entry=0x0, 
skip=skip@entry=0, 
callback=callback@entry=0xc0347380 , 
error_callback=error_callback@entry=0x83fffdfdce70, 
data=data@entry=0x83fffdff0ba8)
at ../../../gcc/libbacktrace/backtrace.c:118
#2  0xc03477e8 in _gfortrani_show_backtrace (
in_signal_handler=in_signal_handler@entry=false)
at ../../../gcc/libgfortran/runtime/backtrace.c:156
#3  0xc0347864 in _gfortran_backtrace ()
at ../../../gcc/libgfortran/runtime/backtrace.c:172
#4  0x40002bc0 in test ()
at /test/gnu/gcc/gcc/gcc/testsuite/gfortran.dg/backtrace_1.f90:8
#5  0x40002c58 in main (argc=-2147482625, 
argv=0xc0347380 )
at /test/gnu/gcc/gcc/gcc/testsuite/gfortran.dg/backtrace_1.f90:10

[Bug fortran/68744] FAIL: gfortran.dg/backtrace_1.f90 -O0 execution test

2015-12-12 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68744

--- Comment #6 from John David Anglin  ---
*** Bug 68742 has been marked as a duplicate of this bug. ***

[Bug fortran/68744] FAIL: gfortran.dg/backtrace_1.f90 -O0 execution test

2015-12-11 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68744

--- Comment #3 from Dominique d'Humieres  ---
Is this PR fixed by revision r231485?

[Bug fortran/68744] FAIL: gfortran.dg/backtrace_1.f90 -O0 execution test

2015-12-11 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68744

--- Comment #4 from dave.anglin at bell dot net ---
On 2015-12-11 6:45 AM, dominiq at lps dot ens.fr wrote:
> Is this PR fixed by revision r231485?
No.  It just fixed the undefined __sync function warnings from HP ld.  
The above
revision was applied when this PR was reported.

The problem here is we no longer get any backtrace.  Haven't had a 
chance to determine
why.

[Bug fortran/68744] FAIL: gfortran.dg/backtrace_1.f90 -O0 execution test

2015-12-07 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68744

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2015-12-07
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
WORKSFORME (x86_64-apple-darwin14) and for others (see x86_64-apple-darwin14).
Is this a regression? If yes, what was your last working revision and did
anything change in your system: new lib, ... ?

[Bug fortran/68744] FAIL: gfortran.dg/backtrace_1.f90 -O0 execution test

2015-12-07 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68744

--- Comment #2 from dave.anglin at bell dot net ---
> WORKSFORME (x86_64-apple-darwin14) and for others (see x86_64-apple-darwin14).
> Is this a regression? If yes, what was your last working revision and did
> anything change in your system: new lib, ... ?


It is likely a regression as there are no gfortran test failures on this target
with 5.2.1:
https://gcc.gnu.org/ml/gcc-testresults/2015-12/msg00496.html

What has changed is the use of __sync functions in libgfortran:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68115

There is a patch which fixes the build of libbacktrace.  However, libbacktrace
thread support
is now disabled because of the lack of __sync support.  Patch is here:
https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00658.html

Effectively, this makes libbacktrace unusable...

--
John David Anglin   dave.ang...@bell.net