Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-17 Thread Ian Lance Taylor
On Thu, Sep 17, 2015 at 7:08 AM, David Edelsohn wrote: > On Wed, Sep 9, 2015 at 12:12 AM, Ian Lance Taylor wrote: >> Mike Stump writes: >> >>> Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also >>> true. See, if AIX should ever define this to a sensible value, the >>> above wo

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-17 Thread David Edelsohn
On Wed, Sep 9, 2015 at 12:12 AM, Ian Lance Taylor wrote: > Mike Stump writes: > >> Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also >> true. See, if AIX should ever define this to a sensible value, the >> above would disappear the feature. However, if they did, then this >>

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-09 Thread Mike Stump
On Sep 8, 2015, at 9:12 PM, Ian Lance Taylor wrote: > Yes, I think this might be even better in code. How about something > like > > /* On some versions of AIX O_CLOEXEC does not fit in int, so use a > cast to force it. */ > descriptor = open (filename, (int) (O_RDONLY | O_BINARY | O_CLOE

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-09 Thread David Edelsohn
On Wed, Sep 9, 2015 at 12:12 AM, Ian Lance Taylor wrote: > Mike Stump writes: > >> Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also >> true. See, if AIX should ever define this to a sensible value, the >> above would disappear the feature. However, if they did, then this >>

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread Ian Lance Taylor
Mike Stump writes: > Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also > true. See, if AIX should ever define this to a sensible value, the > above would disappear the feature. However, if they did, then this > expression should then be false. Yes, I think this might be even

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread FX
> Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also true. > See, if AIX should ever define this to a sensible value, the above would > disappear the feature. However, if they did, then this expression should > then be false. Sounds good. This being a libbacktrace patch, you

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread Mike Stump
On Sep 8, 2015, at 6:53 AM, David Edelsohn wrote: > On Tue, Sep 8, 2015 at 9:51 AM, FX wrote: >>> #define _FCLOEXEC 0x0010L >>> #define O_CLOEXEC _FCLOEXEC /* sets FD_CLOEXEC on open */ >> >> That’s weird, and definitely an AIX bug: >> http://pubs.opengroup.or

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread David Edelsohn
On Tue, Sep 8, 2015 at 9:51 AM, FX wrote: >> #define _FCLOEXEC 0x0010L >> #define O_CLOEXEC _FCLOEXEC /* sets FD_CLOEXEC on open */ > > That’s weird, and definitely an AIX bug: > http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html Welcome to AIX

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread FX
> #define _FCLOEXEC 0x0010L > #define O_CLOEXEC _FCLOEXEC /* sets FD_CLOEXEC on open */ That’s weird, and definitely an AIX bug: http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html How does that even work? open() takes int as second arg. FX

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread FX
> /home/dje/src/src/libbacktrace/posix.c: In function 'backtrace_open': > /home/dje/src/src/libbacktrace/posix.c:67:32: error: overflow in > implicit constant conversion [-Werror=overflow] > descriptor = open (filename, O_RDONLY | O_BINARY | O_CLOEXEC); ?? I have a hard time understanding how th

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread David Edelsohn
On Tue, Sep 8, 2015 at 9:40 AM, David Edelsohn wrote: > On Tue, Sep 8, 2015 at 9:15 AM, FX wrote: >>> libbacktrace is not supported on AIX. This patch breaks bootstrap on AIX. >>> It's okay if Fortran backtrace does not work on AIX, but not all >>> targets support libbacktrace. >> >> libbacktrac

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread David Edelsohn
On Tue, Sep 8, 2015 at 9:15 AM, FX wrote: >> libbacktrace is not supported on AIX. This patch breaks bootstrap on AIX. >> It's okay if Fortran backtrace does not work on AIX, but not all >> targets support libbacktrace. > > libbacktrace is designed to be compiled on all targets. Some targets offe

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread FX
> libbacktrace is not supported on AIX. This patch breaks bootstrap on AIX. > It's okay if Fortran backtrace does not work on AIX, but not all > targets support libbacktrace. libbacktrace is designed to be compiled on all targets. Some targets offer full support, some offer nothing, but libbackt

[PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-08 Thread David Edelsohn
libbacktrace is not supported on AIX. This patch breaks bootstrap on AIX. It's okay if Fortran backtrace does not work on AIX, but not all targets support libbacktrace. Thanks, David

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-04 Thread FX
> 2015-09-05 Janne Blomqvist > >PR fortran/53579 >* libgfortran.h (exit_error): New prototype. >* runtime/error.c (exit_error): New function. >(os_error): Call exit_error instead of exit. >(runtime_error): Likewise. >(runtime_error_at): Likewise. >(internal_error): L

[PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-04 Thread Janne Blomqvist
Hi, the consesus in PR 53379 seems to be that a backtrace is desired in case of error termination. The attached patch implements this. Regtested on x86_64-pc-linux-gnu, Ok for trunk? 2015-09-05 Janne Blomqvist PR fortran/53579 * libgfortran.h (exit_error): New prototype. * runtim