diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2008-04-13 20:15:58 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2008-04-13 20:15:58 +0000 |
commit | c7d0f4d5fabc279dd81330ebffdf037b31420706 (patch) | |
tree | e022b93b7ac1c858cd02bc0f837fdaae49b136ff /libgfortran/runtime/backtrace.c | |
parent | 92d4508a7db153423b0572047fa6947af569d4b6 (diff) | |
download | gcc-c7d0f4d5fabc279dd81330ebffdf037b31420706.zip gcc-c7d0f4d5fabc279dd81330ebffdf037b31420706.tar.gz gcc-c7d0f4d5fabc279dd81330ebffdf037b31420706.tar.bz2 |
re PR libfortran/32972 (performance of pack/unpack)
2008-04-13 Thomas Koenig <tkoenig@gcc.gnu.org>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR libfortran/32972
PR libfortran/32512
configure.ac: Add test for uintptr_t.
configure: Regenerated.
config.h.in: Regenerated.
* libgfortran.h: GFC_DTYPE_DERIVED_1: New macro.
GFC_DTYPE_DERIVED_2: New macro.
GFC_DTYPE_DERIVED_4: New macro.
GFC_DTYPE_DERIVED_8: New macro.
GFC_DTYPE_DERIVED_16: New macro.
GFC_UNALIGNED_2: New macro.
GFC_UNALIGNED_4: New macro.
GFC_UNALIGNED_8: New macro.
GFC_UNALIGNED_16: New macro.
intptr_t: Define if we don't have it.
uintptr_t: Likewise.
* runtime/backtrace.c (show_backtrace): Use intptr_t.
* intrinsics/signal.c (signal_sub): Likewise.
(signal_sub_int): Likewise.
(alarm_sub_int_i4): Likewise.
* intrinsics/spread_generic.c (spread): Use the integer
routines for handling derived types of sizes 1, 2, 4, 8 and 16
if the alignment of all pointers is correct.
(spread_scalar): Likewise.
* intrinsics/pack_generic.c (pack): Likewise.
Use GFD_DTYPE_TYPE_SIZE to avoid nested switch statements.
* intrinsics/unpack_generic.c (unpack1): Likewise.
(unpack0): Likewise.
* runtime/in_pack_generic.c (internal_pack): Likewise.
* runtime/in_unpack_generic.c (internal_unpack): Likewise.
2008-04-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32972
PR libfortran/32512
* gfortran.dg/internal_pack_1.f90: Add test for derived type.
* gfortran.dg/intrinsic_spread_1.f90: Likewise.
* gfortran.dg/intrinsic_pack_1.f90: Likewise.
* gfortran.dg/intrinsic_unpack_1.f90: Likewise.
Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
From-SVN: r134245
Diffstat (limited to 'libgfortran/runtime/backtrace.c')
-rw-r--r-- | libgfortran/runtime/backtrace.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libgfortran/runtime/backtrace.c b/libgfortran/runtime/backtrace.c index 00605b5..4a33888 100644 --- a/libgfortran/runtime/backtrace.c +++ b/libgfortran/runtime/backtrace.c @@ -43,12 +43,6 @@ Boston, MA 02110-1301, USA. */ #include <unistd.h> #endif -#ifdef HAVE_INTPTR_T -# define INTPTR_T intptr_t -#else -# define INTPTR_T int -#endif - #ifdef HAVE_EXECINFO_H #include <execinfo.h> #endif @@ -158,7 +152,7 @@ show_backtrace (void) /* Write the list of addresses in hexadecimal format. */ for (i = 0; i < depth; i++) - addr[i] = xtoa ((GFC_UINTEGER_LARGEST) (INTPTR_T) trace[i], addr_buf[i], + addr[i] = xtoa ((GFC_UINTEGER_LARGEST) (intptr_t) trace[i], addr_buf[i], sizeof (addr_buf[i])); /* Don't output an error message if something goes wrong, we'll simply |