summaryrefslogtreecommitdiffstats
path: root/libgfortran/io/write_float.def
Commit message (Collapse)AuthorAgeFilesLines
* 2014-03-08 Dominique d'Humieres <dominiq@lps.ens.fr>jvdelisle2014-03-081-22/+31
| | | | | | | | | | | | | PR libgfortran/60128 * io/write_float.def (output_float): Remove unused variable nzero_real. Replace a double space with a single one. (determine_en_precision): Fix wrong handling of the EN format. PR libfortran/60128 * gfortran.dg/fmt_en.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208423 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-01-20 Jerry DeLisle <jvdelisle@gcc.gnu>jvdelisle2014-01-211-2/+2
| | | | | | | | | | Dominique d'Humieres <dominiq@lps.ens.fr> * io/write_float.def (output_float): Remove inadvertent test code from previous patch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206865 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-01-19 Jerry DeLisle <jvdelisle@gcc.gnu>jvdelisle2014-01-191-9/+13
| | | | | | | | | | | | | | Dominique d'Humieres <dominiq@lps.ens.fr> PR libfortran/59771 PR libfortran/59774 PR libfortran/59836 * io/write_float.def (output_float): Fix wrong handling of the Fw.0 format. (output_float_FMT_G_): Fixes rounding issues with -m32. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206785 138bc75d-0d04-0410-961f-82ee72b054a4
* Update copyright years in libgfortran/rsandifo2014-01-021-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206296 138bc75d-0d04-0410-961f-82ee72b054a4
* 2013-06-01 Tobias Burnus <burnus@net-b.de>burnus2013-06-031-4/+32
| | | | | | | | | | | | | PR fortran/57496 * io/write_float.def (ISFINITE2Q, ISFINITE2, ISFINITE2L, * ISFINITE, SIGNBIT2Q, SIGNBIT2, SIGNBIT2L, SIGNBIT, ISNAN2Q, ISNAN2, ISNAN2L, ISNAN): New macros. (output_float_FMT_G_,WRITE_FLOAT): Use them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199598 138bc75d-0d04-0410-961f-82ee72b054a4
* Use C99 bool instead of enum try.jb2013-03-191-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | 2013-03-19 Janne Blomqvist <jb@gcc.gnu.org> * libgfortran.h: Include stdbool.h. (enum try): Remove. (notify_std): Change return type to bool. * intrinsics/chmod.c: Don't include stdbool.h. * intrinsics/execute_command_line.c: Likewise. * io/format.c: Likewise. * io/list_read.c (nml_parse_qualifier): Change return type to bool. (nml_read_obj): Likewise. (nml_get_obj_data): Likewise. * io/transfer.c (read_block_form): Fix comment. (write_buf): Change return type to bool. * io/write.c: Don't include stdbool.h. * io/write_float.def (output_float): Change return type to bool. (output_float_FMT_G_ ## x): Change type of result variable. * runtime/error.c (notify_std): Change return type to bool. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196791 138bc75d-0d04-0410-961f-82ee72b054a4
* Update copyright years in libgfortran.rsandifo2013-01-141-2/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195167 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/55539 Fix regression in -fno-sign-zero.jb2012-12-251-3/+6
| | | | | | | | | | | | | | | | | | | libgfortran ChangeLog: 2012-12-26 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/55539 * io/write_float.def (output_float): Take into account decimal dot. testsuite ChangeLog: 2012-12-26 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/55539 * gfortran.dg/nosigned_zero_3.f90: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194717 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/52608 Move the removal of initial zeros.jb2012-03-171-6/+7
| | | | | | | | | | | | 2012-03-17 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/52608 * io/write_float.def (output_float): Move removal of initial zeros until after the scale factor has been applied. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185486 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove commented out debug printf:sjb2012-03-151-5/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185444 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>jb2012-03-151-113/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR libfortran/52434 PR libfortran/48878 PR libfortran/38199 * io/unit.c (get_internal_unit): Default to ROUND_UNSPECIFIED. (init_units): Likewise. * io/write_float.def (determine_precision): New function. (output_float): Take into account buffer with %f format, no need for our own rounding if unspecified or processor specified rounding. (DTOA): Simplify format string, add parameters. (FDTOA): New macros similar to DTOA, but using %f format. (OUTPUT_FLOAT_FMT_G): Stack allocate newf, determine correct precision and fill buffer. (EN_PREC): New macro. (determine_en_precision): New function. (WRITE_FLOAT): For G format, move buffer filling into output_float_FMT_G, use FDTOA for F format. (write_float): Increase buffer due to F format. testsuite ChangeLog: 2012-03-15 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/52434 PR libfortran/48878 PR libfortran/38199 * gfortran.dg/edit_real_1.f90: Don't assume roundTiesToAway. * gfortran.dg/round_1.f03: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185433 138bc75d-0d04-0410-961f-82ee72b054a4
* Let the compiler decide whether to inline.jb2011-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 2011-11-10 Janne Blomqvist <jb@gcc.gnu.org> * intrinsics/cpu_time.c (__cpu_time_1): Don't force inlining. * intrinsics/random.c (rnumber_4): Remove inline attribute. (rnumber_8, rnumber_10, rnumber_16): Likewise. * intrinsics/system_clock.c (gf_gettime_mono): Likewise. * intrinsics/time_1.h (ATTRIBUTE_ALWAYS_INLINE): Remove macro. (gf_cputime): Add inline attribute for MingW version. * io/format.c (format_hash): Remove inline attribute. * io/io.h (memset4): Inline function from transfer.c and write.c moved here. * io/transfer.c (min_off): Remove inline attribute. (memset4): Move to io.h. * io/write.c (memset4): Likewise. (memcpy4): Remove inline attribute. * io/write_float.def (calculate_exp): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181260 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-05-051-12/+18
| | | | | | | | | PR libgfortran/48787 * io/write_float.def (output_float): Adjust up and down rounding for cases where 'd' = 0. Gather common code to one location. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173408 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-05-011-19/+21
| | | | | | | | | | | PR libgfortran/48787 * io/write_float.def (output_float): Gather up integer declarations and add new 'p' for scale factor. Use 'p' in place of the 'dtp' reference everywhere. For ROUND_UP scan the digit string and only perform rounding if something other than '0' is found. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173231 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-04-291-43/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Janne Blomqvist <jb@gcc.gnu.org> PR libgfortran/48488 PR libgfortran/48602 PR libgfortran/48615 PR libgfortran/48684 PR libgfortran/48787 * io/write.c (write_d, write_e, write_f, write_en, write_es): Add precision compemsation parameter to call. (set_fnode_default): Adjust default widths to assure round trip on write and read. (write_real): Adjust call to write_float. (write_real_g0): Calculate compensation for extra precision and adjust call to write_float. * io/write_float.def (output_float_FMT_G_): Use volatile rather than asm volatile to avoid optimization issue. Correctly calculate the number of blanks (nb) to be appended and simplify calculation logic. (write_float): Increase MIN_FIELD_WIDTH by one to accomodate the new default widths. Eliminate the code that attempted to reduce the the precision used in later sprintf functions. Add call parameter to compensate for extra precision. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173166 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-04-201-2/+4
| | | | | | | | | PR libgfortran/48602 * io/write_float.def (output_float_FMT_G): Fix reversal in conditional. Use asm volatile to mark temp variable, avoiding optimization errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172753 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-04-181-5/+24
| | | | | | | | | | PR libgfortran/48602 * io/write_float.def (output_float_FMT_G): Use current rounding mode to set the rounding parameters. (output_float): Skip rounding if value is zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172634 138bc75d-0d04-0410-961f-82ee72b054a4
* Replace sprintf with snprintfjb2011-04-161-22/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172590 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-04-151-2/+2
| | | | | | | | PR libgfortran/48589 * io/write_float.def (write_infnan): Set width properly for G0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172502 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-03-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-03-121-1/+1
| | | | | | | | PR libgfortran/48047 * io/write_float.def (write_float): Change MIN_FIELD_WIDTH to 48. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170895 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-03-011-14/+18
| | | | | | | | | | PR libgfortran/47567 * io/write_float.def (output_float): Move handling of w = 0 to after output rounding. Check for zero and set zero_flag accordingly. Set width according to zero_flag. Add better comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170585 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-02-241-19/+0
| | | | | | | | | PR libgfortran/47567 * io/write_float.def (output_float): Remove special case handling of zero with width 1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170458 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-02-191-1/+1
| | | | | | | | | PR libgfortran/47567 * io/write_float.def (output_float): Adjust width for F0.d to allow space for negative signs on zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170318 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/47642jakub2011-02-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libquadmath.texi (quadmath_snprintf): Document. (quadmath_flt128tostr): Remove. * Makefile.am (libquadmath_la_SOURCES): Add printf/*.c. Remove quadmath_io.c, gdtoa/gdtoa.c, gdtoa/g__fmt.c, gdtoa/g_Qfmt.c, gdtoa/dmisc.c and gdtoa/ulp.c. * quadmath.h (quadmath_snprintf): New prototype. (quadmath_flt128tostr): Remove. * quadmath_weak.h (quadmath_snprintf): Add. (quadmath_flt128tostr): Remove. * configure.ac: New AC_CHECK_HEADERS headers: langinfo.h, wchar.h, wctype.h, limits.h, ctype.h, printf.h, errno.h. (AC_USE_SYSTEM_EXTENSIONS): Add. (HAVE_HIDDEN_VISIBILITY, HAVE_PRINTF_HOOKS, USE_LOCALE_SUPPORT, USE_I18N_NUMBER_H): New checks. * quadmath.map (QUADMATH_1.0): Add quadmath_snprintf. Remove quadmath_flt128tostr. * printf/printf_fphex.c: New file. * printf/_itowa.h: New file. * printf/mul_n.c: New file. * printf/quadmath-printf.h: New file. * printf/submul_1.c: New file. * printf/quadmath-printf.c: New file. * printf/gmp-impl.h: New file. * printf/lshift.c: New file. * printf/fpioconst.h: New file. * printf/add_n.c: New file. * printf/cmp.c: New file. * printf/sub_n.c: New file. * printf/mul.c: New file. * printf/divrem.c: New file. * printf/addmul_1.c: New file. * printf/printf_fp.c: New file. * printf/_itoa.h: New file. * printf/fpioconst.c: New file. * printf/_i18n_number.h: New file. * printf/flt1282mpn.c: New file. * printf/rshift.c: New file. * printf/mul_1.c: New file. * quadmath_io.c: Removed. * gdtoa/gdtoa.c: Removed. * gdtoa/g__fmt.c: Removed. * gdtoa/g_Qfmt.c: Removed. * gdtoa/dmisc.c: Removed. * gdtoa/ulp.c: Removed. * config.h.in: Regenerated. * configure: Regenerated. * Makefile.in: Regenerated. * io/write_float.def (DTOAQ): Use quadmath_snprintf instead of quadmath_flt128tostr. * io/transfer128.c (tmp2): Initialize to quadmath_snprintf instead of quadmath_flt128tostr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170135 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-02-051-7/+7
| | | | | | | | | | PR libgfortran/47567 * io/write_float.def (output_float): Eliminate some redundant code. Adjust width for case of F0.X for values of zero and all other values. Expand cases where '*' is set to give cleaner results. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169853 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-01-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-01-291-14/+32
| | | | | | | | | PR libgfortran/47434 * io/write_float.def (write_infnan): Use calculate_sign to determine if the sign should be given and check field widths accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169390 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2011-01-271-15/+22
| | | | | | | | | PR libgfortran/47285 * io/write_float.def (output_float): Return SUCCESS or FAILURE and use the result to set the padding. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169320 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/46625jakub2011-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * quadmath.map (QUADMATH_1.0): Remove quadmath_strtopQ and quadmath_dtoaq. Add strtoflt128 and quadmath_flt128tostr. * quadmath_weak.h (quadmath_strtopQ, quadmath_dtoaq): Remove. (strtoflt128, quadmath_flt128tostr): Add. * gdtoa/strtopQ.c (quadmath_strtopQ): Rename to... (strtoflt128): ... this. Return __float128, instead of writing to memory pointed by last argument. * quadmath.h: Use C style comments instead of C++ style. (quadmath_strtopQ, quadmath_dtoaq): Remove prototypes. (strtoflt128, quadmath_flt128tostr): Add prototypes. * libquadmath.texi (quadmath_dtoaq): Rename to quadmath_flt128tostr. (quadmath_strtopQ): Rename to strtoflt128. Adjust prototype, adjust examples. * quadmath_io.c (quadmath_dtoaq): Rename to... (quadmath_flt128tostr): ... this. libgfortran/ * io/write_float.def (DTOAQ): Use quadmath_flt128tostr instead of quadmath_dtoa. * io/transfer128.c (tmp1, tmp2): New variables, bring in strtoflt128 and quadmath_flt128tostr. (transfer_real128, transfer_real128_write, transfer_complex128, transfer_complex128_write): Remove tmp1/tmp2 variables. * io/read.c (convert_real): Use strtoflt128 instead of quadmath_strtopQ, adjust for the changed arguments and return value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168856 138bc75d-0d04-0410-961f-82ee72b054a4
* /burnus2010-11-161-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * Makefile.def: Add libquadmath; build it with language=fortran. * configure.ac: Add libquadmath. * Makefile.tpl: Handle multiple libs in check-[+language+]. * Makefile.in: Regenerate. * configure: Regenerate. libquadmath/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 Initial implementation and checkin. gcc/fortran/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * gfortranspec.c (find_spec_file): New function. (lang_specific_driver): Try to find .spec file and use it. * trans-io.c (iocall): Define * IOCALL_X_REAL128/COMPLEX128(,write). (gfc_build_io_library_fndecls): Build decl for __float128 I/O. (transfer_expr): Call __float128 I/O functions. * trans-types.c (gfc_init_kinds): Allow kind-16 belonging to __float128. gcc/testsuite/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * gfortran.dg/quad_1.f90: New. * lib/gcc-defs.exp (gcc-set-multilib-library-path): Use also compiler arguments. * lib/gfortran.exp (gfortran_link_flags): Add libquadmath to library search path; call gcc-set-multilib-library-path with arguments such that libgfortran.spec is found. (gfortran_init): Add path for libgfortran.spec to GFORTRAN_UNDER_TEST. libgomp/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * configure.ac: * configure: Regenerate. libgfortran/ 2010-11-13 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR fortran/32049 * Makefile.am: Add missing pow_r16_i4.c, add transfer128.c, link libquadmath, if used. * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Add. * configure.ac: Use it, touch spec file. * gfortran.map: Add pow_r16_i4 and transfer_(real,complex)128(,write) functions. * intrinsics/cshift0.c (cshift0): Handle __float128 type. * intrinsics/erfc_scaled_inc.c: Ditto. * intrinsics/pack_generic.c (pack): Ditto * intrinsics/spread_generic.c (spread): Ditto. * intrinsics/unpack_generic.c (unpack1): Ditto. * io/read.c (convert_real): Ditto. * io/transfer.c: Update comments. * io/transfer128.c: New file. * io/write_float.def (write_float): Handle __float128 type. * libgfortran.h: #include quadmath_weak.h, define __builtin_infq and nanq. * m4/mtype.m4: Handle __float128 type. * runtime/in_pack_generic.c (internal_pack): Ditto. * runtime/in_unpack_generic.c (internal_unpack): Ditto. * kinds-override.h: New file. * libgfortran.spec.in: Ditto. * generated/pow_r16_i4.c: Generated. * Makefile.in: Regenerate. * configure: Regenerate. * config.h: Regenerate. * bessel_r10.c: Regenerate. * bessel_r16.c: Regenerate. * bessel_r4.c: Regenerate. * bessel_r8.c: Regenerate. * exponent_r16.c: Regenerate. * fraction_r16.c: Regenerate. * nearest_r16.c: Regenerate. * norm2_r10.c: Regenerate. * norm2_r16.c: Regenerate. * norm2_r4.c: Regenerate. * norm2_r8.c: Regenerate. * rrspacing_r16.c: Regenerate. * set_exponent_r16.c: Regenerate. * spacing_r16.c: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166825 138bc75d-0d04-0410-961f-82ee72b054a4
* * acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_ISFINITE,fxcoudert2010-09-091-1/+1
| | | | | | | | | | | | | | | | | LIBGFOR_CHECK_FOR_BROKEN_ISNAN, LIBGFOR_CHECK_FOR_BROKEN_FPCLASSIFY): Remove. * configure.ac: Remove above checks. * libgfortran.h: Define isnan, isinf, isfinite, isnormal and signbit in terms of the respective built-ins. * io/write_float.def (WRITE_FLOAT): Use signbit() instead of __builtin_signbit(). * intrinsics/c99_functions.c (tgamma): Use isnan() instead of __builtin_isnan(). * config.h.in: Regenerate. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164119 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-07-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2010-07-191-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR libfortran/44953 * io/unix.c (mem_alloc_w4): Return gfc_char4_t instead of char type pointer. (mem_write4): Remove cast to gfc_char4_t. * io/transfer.c (write_block): Use a gfc_char4_t pointer. (memset4): New helper function. (next_record_w): Use new helper function rather than sset for internal units. Don't attempt to pad with spaces if it is not needed. * io/unix.h: Update prototype for mem_alloc_w4. * io/write.c (memset4): Use gfc_char4_t pointer and chracter type. Don't use multiply by 4 to compute offset. (memcpy4): Likewise. (write_default_char4): Use a gfc_char4_t pointer and update memset4 and memcpy calls. (write_a): Likewise. (write_l): Likewise. (write_boz): Likewise. (write_decimal): Likewise. (write_x): Likewise. (write_char): Add support for character(kind=4) internal units that was previously missed. (write_integer): Use a gfc_char4_t pointer and update memset4 and memcpy calls. (write_character): Likewise. (write_separator): Add support for character(kind=4) internal units that was previously missed. * write_float.def (output_float): Use a gfc_char4_t pointer and update memset4 and memcpy calls. (write_infnan): Likewise. (output_float_FMT_G_): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162304 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2010-07-131-49/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | PR libfortran/37077 * io/read.c: Fix comment. * io/io.h (is_char4_unit): New macro. * io/unit.c (get_internal_unit): Call new function open_internal4. * io/unix.c (mem_alloc_r4): New function. (mem_alloc_w4): New function. (mem_read4): New function, temporary stub. (mem_write4): New function. (open_internal4): New function to set stream pointers to use the new mem functions. * io/transfer.c (write_block): Use new mem_alloc_w4 to access internal units of kind=4. * io/unix.h: Add prototypes for open_internal4, mem_alloc_w4, and mem_alloc_r4. * io/write.c (memset4): New helper function. (memcpy4): New helper function. (write_default_char4): Use new helper functions. (write_a): Likewise. (write_l): Likewise. (write_boz): Likewise. (write_decimal): Likewise. (write_x): Likewise. (write_integer): Likewise. * io/write_float.def (output_float): Add code blocks to handle internal unit kind=4 output utilizing gfc_char4_t pointers. (write_infnan): Use new helper functions. (OUTPUT_FLOAT_FMT_G): Update this macro likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162123 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove free_memjb2010-05-071-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159160 138bc75d-0d04-0410-961f-82ee72b054a4
* * io/write_float.def (WRITE_FLOAT): Use __builtin_signbit.ro2010-02-241-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157048 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-10-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2009-10-061-10/+9
| | | | | | | | | | PR libgfortran/35862 * write_float.def (outout_float): Fix handling of special case where no digits after the decimal point and values less than 1.0. Adjust index into digits string. (WRITE_FLOAT): Remove special case code from macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152483 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2009-09-291-14/+69
| | | | | | | | | | | | | | | | | | PR libgfortran/35862 * io.h (gfc_unit): Add round_status. (format_token): Add enumerators for rounding format specifiers. * transfer.c (round_opt): New options table. (formatted_transfer_scalar_read): Add set round_status for each rounding format token. (formatted_transfer_scalar_write): Likewise. * format.c (format_lex): Tokenize the rounding format specifiers. (parse_format_list): Parse the rounding format specifiers. * write_float.def (outout_float): Modify rounding code to use new variable rchar to set the appropriate rounding. Fix some whitespace. * unit.c (get_internal_unit): Initialize rounding mode for internal units. (init_units): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152263 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2009-05-201-5/+4
| | | | | | | | PR libfortran/37754 * io/write_float.def: Simplify format calculation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147725 138bc75d-0d04-0410-961f-82ee72b054a4
* Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.jakub2009-04-091-15/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145841 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-03-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2009-03-091-1/+1
| | | | | | | | | PR libfortran/39409 * io/write_float.def (output_float): Handle F0.d formatting correctly for any d when value is 0.0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144718 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-12-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2008-12-221-2/+2
| | | | | | | | | PR libfortran/37472 * io/write_float.def (output_float_FMT_G_): Modify calculation of temp to avoid sensitivity to round-off. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142884 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2008-12-211-11/+20
| | | | | | | | | | | | | | | | | PR libfortran/38398 * io/io.h (st_parameter_dt): Add new bit to keep track of when to suppress blanks for g0 formatting. * io/transfer.c (formatted_transfer_scalar): Always call write_real_g0 for g0 formatting. * io.c (write.c): Do not use ES formatting and use new bit to suppress blanks. * io/write_float.def (output_float): Adjust the location of setting the width so that it can be adjusted when suppressing blanks. Set number of blanks to zero when dtp->u.p.g0_no_blanks is set. Do some minor code clean-up and add some white space for readability. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142871 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-12-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2008-12-051-1/+2
| | | | | | | | | PR fortran/38285 * write_float.def (WRITE_FLOAT): Zero the float value for special case only if scale_factor = 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142455 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-11-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2008-11-211-1/+4
| | | | | | | | | PR libfortran/37472 * io/write_float.def (output_float_FMT_G_): Adjust conversion of G format specification to F format. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142079 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.orgjvdelisle2008-10-191-0/+16
| | | | | | | | | PR libfortran/37834 * io/write_float.def (output_float): Emit '0.' for special case of format specifier 'f0.0' and value of zero. Likewise emit '0' for 'f1.0'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141231 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-10-17 Jerry DeLisle <jvdelisle@gcc.gnu.orgjvdelisle2008-10-181-1/+1
| | | | | | | | | PR libfortran/37707 * io/write_float.def (WRITE_FLOAT): Round to 1.0 correctly. * io/io.h (st_parameter_44): Fix id type declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141207 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.orgjvdelisle2008-09-261-4/+1
| | | | | | | | | | | | | | | | | | | | | | | PR libfortran/37498 * list_read.c (eat_separator): Revert previous patch and move delim_status, decimal_status, and pad_status to gfc_unit. (parse_real): Ditto. (read_real): Ditto. * read.c (read_a): Likewise. (read_a_char4): Likewise. (read_f): Likewise. * inquire.c (inquire_via_unit): Add missing check for IOPARM_INQUIRE_HAS_FLAGS2. (inquire_via_filename): Likewise. * io.h (unit_sign_s): Move delim_status, decimal_status, and pad_status to gfc_unit. * transfer.c (read_sf): Ditto. (read_block_form): Ditto. (formatted_transfer_scalar): Ditto. (data_transfer_init): Ditto. * write.c (write_default_char4): Ditto. (write_utf8_char4): Ditto. (write_character): Ditto. (write_real_g0): Ditto. (list_formatted_write_scalar): Ditto. (nml_write_obj): Ditto. (namelist_write): Ditto. * write_float.def (calculate_sign): Ditto. (output_float): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140684 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.orgjvdelisle2008-09-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/37498 * trans-io.c (gfc_build_io_library_fndecls): Bump pad size. (build_dt): Set mask bit for IOPARM_dt_f2003. * ioparm.def: Add IOPARM_dt_f2003. 2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org PR libfortran/37498 * file_pos (st_endfile): Clear memory only for libfortran 4.3 private area. * list_read.c (eat_separator): Only access F2003 I/O parameters if IOPARM_DT_HAS_F2003 bit is set. (parse_real): Ditto. (read_real): Ditto. * read.c (read_a): Likewise. (read_a_char4): Likewise though not strictly necessary. (read_f): Likewise. * io.h (unit_sign_s): New enumerator to allow duplication of st_parameter structures. (IOPARM_DT_HAS_F2003): New mask bit. (st_parameter_43): New structure copied from 4.3 version of st_paramater_dt private section. (st_parameter_44): New structure with F2003 items added. (st_parameter_dt): Modified to create union of new and old structures to allow correct memory setting for 4.3 ABI compatibility. Bumped the pad size. * transfer.c (read_sf): Do not use F2003 I/O memory areas unless IOPARM_DT_HAS_F2003 bit has been set. (read_block_form): Ditto. (formatted_transfer_scalar): Ditto. (data_transfer_init): Ditto and add comment, fix formatting. * write.c (write_default_char4): Likewise though not strictly necessary. (write_utf8_char4): Ditto. (write_character): Ditto. (write_real_g0): Ditto. (list_formatted_write_scalar): Ditto. (nml_write_obj): Ditto. (namelist_write): Ditto. * write_float.def (calculate_sign): Eliminate warning by including all cases in switch. (output_float): Output only decimal point of F2003 flag is not set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140576 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-07-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2008-07-211-25/+28
| | | | | | | | | PR fortran/36857 * io/write_float.def: Comment out locale dependent code and fix general comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138021 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2008-04-051-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/25829 28655 * gfortran.map: Add new symbol, _gfortran_st_wait. * libgfortran.h (st_paramter_common): Add new I/O parameters. * open.c (st_option decimal_opt[], st_option encoding_opt[], st_option round_opt[], st_option sign_opt[], st_option async_opt[]): New parameter option arrays. (edit_modes): Add checks for new parameters. (new_unit): Likewise. (st_open): Likewise. * list_read.c (CASE_SEPERATORS): Add ';' as a valid separator. (eat_separator): Handle deimal comma. (read_logical): Fix whitespace. (parse_real): Handle decimal comma. (read_real): Handle decimal comma. * read.c (read_a): Use decimal status flag to allow comma in place of a decimal point. (read_f): Allow comma as acceptable character in float. According to decimal flag, substitute a period for a comma. (read_x): If decimal status flag is comma, disable the read_comma flag, not allowing comma as a delimiter, an extension otherwise. * io.h: (unit_decimal, unit_encoding, unit_round, unit_sign, unit_async): New enumerators. Add all new I/O parameters. * unix.c (unix_stream, int_stream): Add io_mode asychronous I/O control. (move_pos_offset, fd_alloc_w_at): Fix some whitespace. (fd_sfree): Use new enumerator. (fd_read): Likewise. (fd_write): Likewise. (fd_close): Fix whitespace. (fd_open): Use new enumertors. (tempfile, regular_file, open_external): Fix whitespace. (output_stream, error_stream): Set method. (stream_offset): Fix whitespace. * transfer.c: (st_option decimal_opt[], sign_opt[], blank_opt[]): New option arrays. (formatted_transfer_scalar): Set sf_read_comma flag based on new decimal_status flag. (data_transfer_init): Initialize new parameters. Add checks for decimal, sign, and blank. (st_wait): New stub. * format.c: (format_lex): Add format specifiers DP, DC, and D. (parse_format_list): Parse the new specifiers. * write.c (write_decimal): Use new sign enumerators to set the sign. (write_complex): Handle decimal comma and semi-colon separator. (nml_write_obj): Likewise. * write_float.def: Revise sign enumerators. (calculate_sign): Use new sign enumerators. (output_float): Likewise. Use new decimal_status flag to set the decimal character to a point or a comma. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133943 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-02-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2008-02-211-0/+13
| | | | | | | | | PR libfortran/35036 * write_float.def (output_float): Add error checks for zero digits after decimal point in E and D format specifiers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132510 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud