summaryrefslogtreecommitdiffstats
path: root/libgfortran/io
Commit message (Collapse)AuthorAgeFilesLines
...
* * io/unit.c (get_unit): Mark argument as unused.aj2005-05-171-3/+3
| | | | | | | (init_units): Avoid warning about signed comparision. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99842 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.ac: Add additional warning flags.aj2005-05-176-33/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure: Regenerate. * io/write.c (calculate_G_format): Remove unused parameter. (output_float): Remove unused parameter. (write_float): Change callers. (nml_write_obj): Avoid signed warning. Make variable const to support -Wwrite-strings. * io/unix.c (fd_alloc, mmap_open, mmap_sfree, mem_sfree, mem_truncate): Mark argument as unused. * io/unit.c (get_unit): Mark argument as unused. (init_units): Avoid warning about signed comparision. * io/transfer.c (next_record_r): Remove unused parameter. (next_record_w): Remove unused parameter. (next_record): Change callers. (iolength_transfer): Mark arguments as unused. * io/open.c: Add initializer. * io/list_read.c (read_character): Mark argument as unused. (nml_match_name): Add const to make compile with -Wwrite-strings. * io/format.c: Add initializer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99839 138bc75d-0d04-0410-961f-82ee72b054a4
* * m4/eoshift1.m4: Initialize variables to avoid warnings.aj2005-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | * m4/eoshift3.m4: Initialize variables to avoid warnings. * generated/eoshift1_4.c, generated/eoshift1_8.c, generated/eoshift3_4.c, generated/eoshift3_8.c: Regenerated. * intrinsics/spread_generic.c (spread): Initialize variables to avoid warnings. * intrinsics/eoshift0.c (eoshift0): Initialize variables to avoid warnings. * intrinsics/eoshift2.c (eoshift2): Initialize variables to avoid warnings. * io/list_read.c (nml_get_obj_data): Initialize variables to avoid warnings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99726 138bc75d-0d04-0410-961f-82ee72b054a4
* * intrinsics/system_clock.c (system_clock_4, system_clock_8): Addaj2005-05-151-1/+1
| | | | | | | | | | missing returns, reformat a bit. * io/write.c (nml_write_obj): Use %d again - and cast to int, st_sprintf does not handle %ld. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99722 138bc75d-0d04-0410-961f-82ee72b054a4
* * io/unit.c (is_internal_unit): Add void as parameter list.aj2005-05-152-9/+9
| | | | | | | * io/transfer.c: Move prototype declarations before the functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99721 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove extra whitespace.aj2005-05-154-37/+35
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99720 138bc75d-0d04-0410-961f-82ee72b054a4
* * runtime/normalize.c (almostone_r4, almostone_r8): Fix parameteraj2005-05-156-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | list. * intrinsics/random.c (KISS_DEFAULT_SEED): Remove extra semicolon. * io/transfer.c: Do not use empty initializers for global objects. Add missing initializers. * io/lock.c: Do not use empty initializers for global objects. * io/close.c: Add missing initializers. * runtime/environ.c: Add missing initializers. Do not use empty initializers for global object. (init_string): Mark argument as unused. * runtime/main.c (cleanup): Fix parameter list. * io/io.h: Fix parameter lists. * m4/transpose.m4, m4/matmul.m4: Fix pointer cast to avoid warning. * generated/transpose_c4.c, generated/transpose_c8.c, generated/transpose_i4.c, generated/transpose_i8.c, generated/matmul_c4.c, generated/matmul_c8.c, generated/matmul_i4.c, generated/matmul_i8.c, generated/matmul_r4.c, generated/matmul_r8.c: Regenerated. * io/write.c (nml_write_obj): Fix 64-bit problem. * io/list_read.c (nml_get_obj_data): Add missing braces around initializer to avoid warnings. * intrinsics/etime.c (etime_sub): Remove unused variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99719 138bc75d-0d04-0410-961f-82ee72b054a4
* * intrinsics/chdir.c, intrinsics/getlog.c, intrinsics/link.c,aj2005-05-151-2/+1
| | | | | | | | | | | | | | | intrinsics/symlnk.c, intrinsics/perror.c: Include <string.h> for prototypes. * runtime/string.c (compare0): Remove unused variable. * io/unit.c (init_units): Remove unused variables. * intrinsics/getcwd.c (getcwd_i4_sub): Remove unused variable. * intrinsics/unlink.c (unlink_i4_sub): Remove unused variable. * intrinsics/stat.c (stat_i4_sub, fstat_i8_sub, fstat_i4_sub, stat_i8_sub): Remove unused variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99716 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-05-12 Thomas Koenig <Thomas.Koenig@online.de>tkoenig2005-05-123-0/+6
| | | | | | | | | | | | | | | | PR libfortran/21324 * runtime/memory.c: Don't define GFC_CLEAR_MEMORY (it's a performance hog). * io/open.c (new_unit): Zero freshly allocated memory for unit structure. * io/unit.c (init_units): Zero freshly allocated memory for STDIN, STDOUT and STDERR. * io/unix.c (open_internal): Zero freshly allocated memory for unix_stream. (fd_to_stream): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99619 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/19478fxcoudert2005-05-111-2/+4
| | | | | | | | | * io/unix.c (fd_truncate): update positions when ftruncate fails (like writing to /dev/null). * gfortran.dg/dev_null.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99570 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/21471fxcoudert2005-05-111-0/+7
| | | | | | | | | * open.c (new_unit): Take care of the case where POSITION_APPEND is specified (sseek to the end, and set u>-endfile). * gfortran.dg/append-1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99560 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/20788fxcoudert2005-05-101-2/+4
| | | | | | | | | | | | | | | | | | Missing entry from previous commit: * io/unix.c (fd_to_stream): Add an avoid_mmap argument indicating we don't we to mmap this stream. Use fd_open instead of mmap_open in that case. (open_external): Call fd_to_stream with avoid_mmap = 0. (input_stream): Call fd_to_stream with avoid_mmap = 1. (output_stream): Likewise. (error_stream): Likewise. Really committing: * io/read.c (read_f): Accept 'e', 'E', 'd' and 'D' as first non-blank characters of a real number. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99508 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/19155fxcoudert2005-05-091-6/+9
| | | | | | | | | * io/read.c (read_f): Accept 'e', 'E', 'd' and 'D' as first non-blank characters of a real number. * gfortran.dg/pr19155.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99424 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.ac: Check for ftruncate and chsize.fxcoudert2005-04-291-0/+7
| | | | | | | | | | * io/unix.c (fd_truncate): Provide chsize as alternative to ftruncate. * config.h.in: Regenerate. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98989 138bc75d-0d04-0410-961f-82ee72b054a4
* * io/rewind.c (st_rewind): Flush the stream when resetting the modedje2005-04-261-3/+7
| | | | | | | from WRITING to READING. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98788 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix bug that causes testsuite failure in namelist_13.f90 on some systems.pault2005-04-232-3/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98610 138bc75d-0d04-0410-961f-82ee72b054a4
* correct memory leaks in namelist code for derived typespault2005-04-181-2/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98352 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/20950fxcoudert2005-04-181-7/+10
| | | | | | | | | * io/inquire.c (inquire_via_unit): Check for the gfc_unit being NULL when setting ioparm.sequential. * gfortran.dg/pr20950.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98312 138bc75d-0d04-0410-961f-82ee72b054a4
* -------------------------------------------------------------------pault2005-04-175-258/+1356
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98287 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-04-10 Thomas Koenig <Thomas.Koenig@online.de>tkoenig2005-04-101-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR libfortran/17992 PR libfortran/19568 PR libfortran/19595 PR libfortran/20005 PR libfortran/20092 PR libfortran/20131 PR libfortran/20138 PR libfortran/20661 PR libfortran/20744 * io/transfer.c (top level): eor_condition: New static variable. (read_sf): Remove unnecessary zeroing of buffer (there is enough information in its length). Return a string of length 0 (to be padded by caller) if EOR was seen previously. Remove erroneous special casing of EOR for standard input. Set eor_condition for non-advancing I/O if an end of line was detected. Increment ioparm.size if necessary. (formatted_transfer): Skip the function if there is an EOR condition. (data_transfer_init): Initialize eor_condition to zero (false). (next_record_r): Clear sf_seen_eor if a \n has been seen already. (finalize_transfer): If there is an EOR condition, raise the error. 2005-04-10 Thomas Koenig <Thomas.Koenig@online.de> * eor_handling_1.f90: New test case. * eor_handling_2.f90: New test case. * eor_handling_3.f90: New test case. * eor_handling_4.f90: New test case. * eor_handling_5.f90: New test case. * noadv_size.f90: New test case. * pad_no.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97943 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/19872kargl2005-04-101-0/+7
| | | | | | | | * io/transfer.c (data_transfer_init): truncate an existing file on the first write. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97937 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/13257pinskia2005-04-091-2/+3
| | | | | | | | | | | | | | | | fortran/ChangeLog: * io.c (check_format): Allow an optional comma between descriptors. libgfortran/ChangeLog: * format.c (parse_format_list): Allow an optional comma between descriptors. testsuite/ChangeLog: * comma_format_extension_[1234].f: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97919 138bc75d-0d04-0410-961f-82ee72b054a4
* * io/backspace.c (unformatted_backspace): Do not dereferenceebotcazou2005-04-081-4/+7
| | | | | | | the pointer to the stream. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97851 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/20755fxcoudert2005-04-051-1/+3
| | | | | | | | | | * write.c (write_float): A G edit descriptor may locally change the scale factor, but it needs to be restored afterwards. * gfortran.dg/pr20755.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97627 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/20068fxcoudert2005-04-031-4/+11
| | | | | | | | | | | | | | | PR libfortran/20125 PR libfortran/20156 PR libfortran/20471 * io/backspace.c (unformatted_backspace): Fix error in arithmetic. (st_backspace): When in WRITING mode, we flush and falling back into READING mode. In all cases, correctly position the stream. * gfortran.dg/backspace.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97478 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/20660fxcoudert2005-03-312-1/+12
| | | | | | | | | | | | * io/inquire.c (inquire_via_unit): Non-opened units should still be reported by an INQUIRE statement as existing. * io/transfer.c (data_transfer_init): Never accept negative units. PR libfortran/20660 * gfortran.dg/negative_unit.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97326 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/20163fxcoudert2005-03-291-0/+3
| | | | | | | | | | * io/open.c (st_open): call library_end() before returning even if an error arises. * gfortran.dg/pr20163-2.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97153 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/19678fxcoudert2005-03-252-4/+10
| | | | | | | | | | | | | | | | | PR libfortran/19679 * gfortran.dg/dos_eol.f: New test. PR libfortran/19678 * list_read.c (next_char, eat_separator, finish_separator, read_real) (namelist_read): Add support for '\r' as well as '\n' as EOL character. PR libfortran/19679 * list_read.c (read_sf): Add a '\r' in a test to support DOS line-endings when line length is exceeded. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97041 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/15332fxcoudert2005-03-251-0/+1
| | | | | | | | | | * io/format.c (parse_format_list): format node for colon edit descriptor needs a repeat counter set to 1. * gfortran.dg/pr15332.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97036 138bc75d-0d04-0410-961f-82ee72b054a4
* * libgfortran/io/write.c (output_float): fix typo in last commit.fxcoudert2005-03-231-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96958 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/18025fxcoudert2005-03-231-1/+1
| | | | | | | | | | * write.c (output_float): Handling the "F0.d" format similarly as commercial compilers. * pr18025.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96953 138bc75d-0d04-0410-961f-82ee72b054a4
* * io.h: Setting higher default record length.fxcoudert2005-03-161-3/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96574 138bc75d-0d04-0410-961f-82ee72b054a4
* * open.c (new_unit): set record length to max_offset rather thanfxcoudert2005-03-161-1/+1
| | | | | | | | | using a hard-coded limit (which was too low). * write_big_array.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96573 138bc75d-0d04-0410-961f-82ee72b054a4
* * write.c (output_float): special check when writing 0.0 withfxcoudert2005-03-161-2/+4
| | | | | | | | | EN and ES formats. * pr20480.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96566 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>bdavis2005-03-111-1/+17
| | | | | | | | | | | | | | | | PR libfortran/20124 * gfortran.dg/pr20124.f90: New Test 2005-03-11 Francois-Xavier Coudert <coudert@clipper.ens.fr> PR libfortran/20124 * write.c (output_float): Adds a nzero_real variable to store the number of leading zeros whatever the format width is. Corrects the rounding of numbers less than 10^(-width). Fixes typo in an error message. Updates copyright years git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96291 138bc75d-0d04-0410-961f-82ee72b054a4
* * io/write.c: Update copyright years.tobi2005-02-271-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95630 138bc75d-0d04-0410-961f-82ee72b054a4
* libgfortran/tobi2005-02-271-1/+2
| | | | | | | | | | | | | | | | | 2005-02-27 Fran��ois-Xavier Coudert <coudert@clipper.ens.fr> PR libfortran/20101 * write.c (output_float): Adding special check for value 0.0 in PE format. gcc/testsuite/ 2005-02-27 Fran��ois-Xavier Coudert <coudert@clipper.ens.fr> PR libfortran/20101 * gfortran.dg/write_0_pe_format.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95628 138bc75d-0d04-0410-961f-82ee72b054a4
* libgfortran/tobi2005-02-271-1/+1
| | | | | | | | | | * io/write.c (output_float): Fix typo in condition. gcc/testsuite/ * gfortran.dg/e_d_fmt.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95615 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-02-22 Paul Thomas <paulthomas2@wannado.fr>bdavis2005-02-231-4/+2
| | | | | | | | | | | | | | Bud Davis <bdavis@gfortran.org> * io/list_read.c (read_real): Handle separators properly in list directed read. 2005-02-22 Bud Davis <bdavis@gfortran.org> * gfortran.dg/list_read_4.f90: new test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95436 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-02-21 Bud Davis <bdavis@gfortran.org>bdavis2005-02-221-1/+1
| | | | | | | | | | | | | | PR fortran/20086 * io/transfer.c (write_constant_string): accept an 'h' as the start of a hollerith format string. 2005-02-21 Bud Davis <bdavis9659@comcast.net> PR fortran/20086 * gfortran.dg/pr20086.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95379 138bc75d-0d04-0410-961f-82ee72b054a4
* * io/write.c(output_float): Typo in error message.kargl2005-02-211-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95343 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-01-30 Bud Davis <bdavis@gfortran.org>bdavis2005-01-301-1/+1
| | | | | | | | | | | PR fortran/19647 * io/inquire.c (inquire_via_unit): Use correct variable for pad. * gfortan.dg/inquire_7.f90 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94439 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-01-29 Thomas Koenig <Thomas.Koenig@online.de>pbrook2005-01-291-1/+1
| | | | | | | | | | PR libfortran/19595 * io/transfer.c (data_transfer_init): eor requires advance="NO". testsuite/ * gfortran.dg/eor_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94410 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/19524tobi2005-01-251-2/+0
| | | | | | | * io/read.c (read_f): Don't free uninitialized pointer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94232 138bc75d-0d04-0410-961f-82ee72b054a4
* Update Copyright.pbrook2005-01-231-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94118 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-01-22 Thomas Koenig <Thomas.Koenig@online.de>pbrook2005-01-231-0/+3
| | | | | | | | | | PR libfortran/19451 * io/transfer.c (finalize_transfer): Don't do anything if there is an error condition. * open_readonly_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94101 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libgfortran/19052dje2005-01-234-4/+42
| | | | | | | | | | | | | * libgfortran.h (options_t): Add stderr_unit. * io/io.h (error_stream): Declare. * io/open.c (new_unit): Do not terminate abnormally if opening file preconnected to stdin, stdout, or stderr. * io/unit.c (init_units): Initialize stderr_unit. * io/unix.c (error_stream): New function. * runtime/environ.c (GFORTRAN_STDERR_UNIT): New environment variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94090 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-01-22 Thomas Koenig <Thomas.Koenig@online.de>pbrook2005-01-221-30/+41
| | | | | | | | | | | | | | | | | | PR libfortran/18982 * io/unix.c (regular_file): No need to change flags->action if an error occurs. Document this. No need to call stat() for STATUS_OLD, open() will fail anyway. For ACTION_UNSPECIFIED, try open for read-write, then for read-only if open fails with EACCES, then for write-only if that fails with EACCES again. * io/unix.c (open_external): Document changed behavior of regular_file. testsuite/ * gfortran.dg/open_new.f90: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94076 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/fortran/tobi2005-01-221-53/+39
| | | | | | | | | | | | | | | | | | PR fortran/19194 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string length parameters. (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not pointer fields. libgfortran/ PR fortran/19194 * io/io.h (st_parameter): Use 'GFC_INTEGER_4' instead of 'int', use CHARACTER macro for definition of string valued paramters. Also fix years in recent ChangeLog entries. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94065 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-01-22 Bud Davis <bdavis9659@comcast.net>bdavis2005-01-223-6/+25
| | | | | | | | | | | | | | PR fortran/19314 * io/inquire.c(inquire_via_unit): implement POSITION=. * io/transfer.c(next_record): update position for INQUIRE. * io/rewind.c(st_rewind): update position for INQUIRE. * gfortran.dg/inquire_5.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94060 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud