Bud Davis
802fc8260d
re PR libfortran/19478 (reading back from /dev/null)
...
PR fortran/19478
* io/unix.c (fd_truncate): update positions when ftruncate
fails (like writing to /dev/null).
* gfortran.dg/dev_null.f90: New test.
From-SVN: r99570
2005-05-11 10:34:05 +00:00
Francois-Xavier Coudert
da32fddcb6
re PR libfortran/21471 ('POSITION = "APPEND"' doesn't seem to work)
...
PR libfortran/21471
* 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.
From-SVN: r99560
2005-05-11 05:56:20 +00:00
Tobias Schlüter
973ff4c052
re PR fortran/20178 (COMPLEX function returns incompatible with g77)
...
gcc/fortran/
PR fortran/20178
* gfortran.h (gfc_option): Add flag_f2c.
* invoke.texi: Document '-ff2c' command line option. Adapt
documentation for '-fno-second-underscore' and '-fno-underscoring'.
* lang.opt (ff2c): New entry.
* options.c (gfc-init_options): Set default calling convention
to -fno-f2c. Mark -fsecond-underscore unset.
(gfc_post_options): Set -fsecond-underscore if not explicitly set
by user.
(handle_options): Set gfc_option.flag_f2c according to requested
calling convention.
* trans-decl.c (gfc_get_extern_function_decl): Use special f2c
intrinsics where necessary.
(gfc_trans_deferred_vars): Change todo error to assertion.
* trans-expr.c (gfc_conv_variable): Dereference access
to hidden result argument.
(gfc_conv_function_call): Add hidden result argument to argument
list if f2c calling conventions requested. Slightly restructure
tests. Convert result of default REAL function to requested type
if f2c calling conventions are used. Dereference COMPLEX result
if f2c cc are used.
* trans-types.c (gfc_sym_type): Return double for default REAL
function if f2c cc are used.
(gfc_return_by_reference): Slightly restructure logic. Return
COMPLEX by reference depending on calling conventions.
(gfc_get_function_type): Correctly make hidden result argument a
pass-by-reference argument for COMPLEX. Remove old code which does
this for derived types.
libgfortran/
PR fortran/20178
* Makefile.am (gfor_specific_src): Add 'intrinsics/f2c_intrinsics.F90'
to dependencies.
* Makefile.in: Regenerate.
* intrinsics/f2c_specific.F90: New file.
gcc/testsuite/
PR fortran/20178
* gfortran.dg/f2c_1.f90, gfortran.dg/f2c_2.f90,
gfortran.dg/f2c_3.f90: New tests.
From-SVN: r99544
2005-05-11 00:06:55 +02:00
Francois-Xavier Coudert
8809f6f945
re PR libfortran/20788 (Loading libgfortran.so clobbers C redirection of stdin/stdout/stderr)
...
PR libfortran/20788
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.
From-SVN: r99508
2005-05-10 08:34:58 +00:00
Mike Stump
f4c767fdc2
* configure: Regenerate.
...
From-SVN: r99498
2005-05-10 01:43:00 +00:00
Francois-Xavier Coudert
4581ba9d4f
re PR libfortran/19155 ([4.0 only] blanks not treated as zeros in 'E' format read (NIST FM110.FOR))
...
PR libfortran/19155
* 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.
From-SVN: r99424
2005-05-09 11:21:01 +00:00
Thomas Koenig
e33e218bad
re PR libfortran/21354 ([4.0 only] Rank 7 not handled correctly)
...
2005-05-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21354
* m4/cshift1.m4: Change dimension of auxiliary arrays from
GFC_MAX_DIMENSION - 1 to GFC_MAX_DIMENSION.
* m4/eoshift1.m4: Likewise.
* m4/eoshift3.m4: Likewise.
* m4/ifunction.m4: Likewise.
* m4/in_pack.m4: Likewise.
* m4/in_unpack.m4: Likewise.
* intrinsics/cshift0.c: Likewise.
* intrinsics/eoshift0.c: Likewise.
* intrinsics/eoshift2.c: Likewise.
* intrinsics/random.c: Likewise.
* intrinsics/spread_generic.c: Likewise.
* intrinsics/stat.c: Likewise.
* generated/all_l4.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/any_l4.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/count_4_l4.c: Regenerated.
* generated/count_4_l8.c: Regenerated.
* generated/count_8_l4.c: Regenerated.
* generated/count_8_l8.c: Regenerated.
* generated/cshift1_4.c: Regenerated.
* generated/cshift1_8.c: Regenerated.
* generated/eoshift1_4.c: Regenerated.
* generated/eoshift1_8.c: Regenerated.
* generated/eoshift3_4.c: Regenerated.
* generated/eoshift3_8.c: Regenerated.
* generated/in_pack_i4.c: Regenerated.
* generated/in_pack_i8.c: Regenerated.
* generated/in_unpack_i4.c: Regenerated.
* generated/in_unpack_i8.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/sum_r8.c: Regenerated.
2005-05-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21354
gfortran.dg/in_pack_rank7.f90: New test.
From-SVN: r99232
2005-05-04 21:38:23 +00:00
Thomas Koenig
8e249b232d
re PR libfortran/18958 ([4.0 only] eoshift segfaults when shifting off the end of an array)
...
2005-04-30 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/18958
libgfortran.h: Change typedef of index_type from size_t
to ssize_t.
2005-04-30 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/18958
* gfortran.dg/eoshift.f90: New test case.
From-SVN: r99047
2005-04-30 20:51:39 +00:00
Paul Thomas
f6c7d65b66
Fix matmul PR18857 and supply testcase
...
From-SVN: r99041
2005-04-30 18:17:54 +00:00
Francois-Xavier Coudert
1fb2002d69
configure.ac: Check for ftruncate and chsize.
...
* configure.ac: Check for ftruncate and chsize.
* io/unix.c (fd_truncate): Provide chsize as alternative to
ftruncate.
* config.h.in: Regenerate.
* configure: Regenerate.
From-SVN: r98989
2005-04-29 14:24:04 +00:00
Tobias Schlüter
d8955e4baf
* intrinsics/rename.c: Add missing #includes.
...
From-SVN: r98961
2005-04-29 02:46:36 +02:00
Tobias Schlüter
0ffcc9e7dd
* AUTHORS, COPYING, INSTALL, NEWS, README: Remove.
...
From-SVN: r98935
2005-04-28 22:25:11 +02:00
David Edelsohn
f5b092e391
Add PR to ChangeLog.
...
From-SVN: r98796
2005-04-26 18:17:41 -04:00
David Edelsohn
9adcdfb365
rewind.c (st_rewind): Flush the stream when resetting the mode from WRITING to READING.
...
* io/rewind.c (st_rewind): Flush the stream when resetting the mode
from WRITING to READING.
From-SVN: r98788
2005-04-26 15:27:11 -04:00
Paul Thomas
bfe936c0c1
Fix bug that causes testsuite failure in namelist_13.f90 on some systems.
...
Co-Authored-By: Jerry DeLisle <jvdelisle@verizon.net>
From-SVN: r98610
2005-04-23 12:38:08 +00:00
Thomas Koenig
da8f3dcc5b
05-04-22 Thomas Koenig <Thomas.Koenig@online.de>
...
PR libfortran/20074
PR libfortran/20436
PR libfortran/21108
* gfortran.dg/nested_reshape.f90: new test
* gfortran.dg/reshape-alloc.f90: new test
* gfortran.dg/reshape.f90: new test
2005-04-22 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/20074
PR libfortran/20436
PR libfortran/21108
* m4/reshape.m4 (reshape_`'rtype_kind): rs, rex: New
variables, to be used in calculation of return array sizes.
Populate return array descriptor if ret->data is NULL.
Fix condition for early return (it used to test something
undefined if order was used).
Remove duplicate check wether pad is used.
* intrinsics/reshape_generic.c (reshape_generic): Likewise.
Fix a few places where the wrong variables were set.
* generated/reshape_i4.c: Regenerated.
* generated/reshape_i8.c: Regenerated.
From-SVN: r98585
2005-04-22 20:02:44 +00:00
Paul Thomas
883dd42959
correct memory leaks in namelist code for derived types
...
From-SVN: r98352
2005-04-18 22:19:27 +00:00
Francois-Xavier Coudert
293fcb2e28
re PR libfortran/20950 ([4.0 only] segfault in INQUIRE asking for SEQUENTIAL status)
...
PR libfortran/20950
* io/inquire.c (inquire_via_unit): Check for the gfc_unit being
NULL when setting ioparm.sequential.
* gfortran.dg/pr20950.f: New test.
From-SVN: r98312
2005-04-18 07:34:32 +00:00
Thomas Koenig
5f9bfaf2bc
005-04-17 Thomas Koenig <Thomas.Koenig@online.de>
...
PR libfortran/21075
* m4/reshape.m4 (reshape_`'rtype_kind): Change dimension
of auxiliary arrays from GFC_MAX_DIMENSIONS - 1 to
GFC_MAX_DIMENSIONS.
* intrinsics/reshape_generic.c (reshape_generic): Likewise.
* generated/reshape_i4.c: Regenerated.
* generated/reshape_i8.c: Regenerated.
2005-04-17 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21075
* gfortran.dg/reshape_rank7.f90: New test.
From-SVN: r98288
2005-04-17 20:26:57 +00:00
Paul Thomas
29dc5138c3
re PR fortran/17472 ([4.0 only] namelist does not handle arrays)
...
-------------------------------------------------------------------
From-SVN: r98287
2005-04-17 20:09:37 +00:00
Thomas Koenig
8e6d7b8a35
re PR libfortran/18495 ([4.0 only] Intrinisc function SPREAD is broken)
...
2005-04-15 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/18495
* intrinsics/spread_generic.c (spread): Remove const from
return array descriptor.
New variables: rrank (rank of return array), rs (for
calculating the size of the return array), srank (rank
of the source array).
Generate runtime error if the dim= argument is larger than
the rank of the return array.
Generate runtime error if the needed rank of the return
array is larger than 7.
If ret->data is null, populate the return array descriptor
and initialize the variables for the actual operation.
Otherwise, set ret->dim[0].stride to one if it is zero.
Change second, independent use of variable dim to srank.
2005-04-15 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/18495
* gfortran.fortran-torture/execute/intrinsic_spread.f90:
Test callee-allocated version of return array with a write
statement.
Test spread with a temporary with another write statement.
From-SVN: r98208
2005-04-15 20:06:17 +00:00
Mike Stump
6dab073ba7
* configure: Regenerate.
...
From-SVN: r98065
2005-04-13 01:41:26 +00:00
Thomas Koenig
c6abe94dc1
re PR libfortran/19106 ([4.0 only] segfault in executable for print *,sum(a,dim=2,mask=a>0))
...
2005-04-13 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/19106
* m4/iforeach.c (name`'rtype_qual`_'atype_code): Add TODO
that setting correct strides is a front end job.
(`m'name`'rtype_qual`_'atype_code): Likewise. If mask has
a lowest stride of 0, adjust to 1.
* m4/ifunction.c (name`'rtype_qual`_'atype_code): Add TODO
that setting correct strides is a front end job.
(`m'name`'rtype_qual`_'atype_code): Likewise. If mask has
a lowest stride of 0, adjust to 1.
* maxloc0_4_i4.c: Regenerated
* maxloc0_4_i8.c: Regenerated
* maxloc0_4_r4.c: Regenerated
* maxloc0_4_r8.c: Regenerated
* maxloc0_8_i4.c: Regenerated
* maxloc0_8_i8.c: Regenerated
* maxloc0_8_r4.c: Regenerated
* maxloc0_8_r8.c: Regenerated
* maxloc1_4_i4.c: Regenerated
* maxloc1_4_i8.c: Regenerated
* maxloc1_4_r4.c: Regenerated
* maxloc1_4_r8.c: Regenerated
* maxloc1_8_i4.c: Regenerated
* maxloc1_8_i8.c: Regenerated
* maxloc1_8_r4.c: Regenerated
* maxloc1_8_r8.c: Regenerated
* maxval_i4.c: Regenerated
* maxval_i8.c: Regenerated
* maxval_r4.c: Regenerated
* maxval_r8.c: Regenerated
* minloc0_4_i4.c: Regenerated
* minloc0_4_i8.c: Regenerated
* minloc0_4_r4.c: Regenerated
* minloc0_4_r8.c: Regenerated
* minloc0_8_i4.c: Regenerated
* minloc0_8_i8.c: Regenerated
* minloc0_8_r4.c: Regenerated
* minloc0_8_r8.c: Regenerated
* minloc1_4_i4.c: Regenerated
* minloc1_4_i8.c: Regenerated
* minloc1_4_r4.c: Regenerated
* minloc1_4_r8.c: Regenerated
* minloc1_8_i4.c: Regenerated
* minloc1_8_i8.c: Regenerated
* minloc1_8_r4.c: Regenerated
* minloc1_8_r8.c: Regenerated
* minval_i4.c: Regenerated
* minval_i8.c: Regenerated
* minval_r4.c: Regenerated
* minval_r8.c: Regenerated
* product_c4.c: Regenerated
* product_c8.c: Regenerated
* product_i4.c: Regenerated
* product_i8.c: Regenerated
* product_r4.c: Regenerated
* product_r8.c: Regenerated
* sum_c4.c: Regenerated
* sum_c8.c: Regenerated
* sum_i4.c: Regenerated
* sum_i8.c: Regenerated
* sum_r4.c: Regenerated
* sum_r8.c: Regenerated
2005-04-13 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/19016
* gfortran.fortran-torture/execute/intrinsic_mmloc.f90:
Add tests with mask generated by expression.
* gfortran.fortran-torture/execute/intrinsic_mmval.f90: Likewise.
* gfortran.fortran-torture/execute/intrinsic_product.f90: Likewise.
* gfortran.fortran-torture/execute/intrinsic_sum.f90: Likewise.
From-SVN: r98052
2005-04-12 22:57:10 +00:00
François-Xavier Coudert
b45ea4d28c
* runtime/environ.c: Correct previous commit for obvious typo.
...
From-SVN: r97947
2005-04-10 13:08:12 +00:00
Francois-Xavier Coudert
64d5075d0b
re PR libfortran/20788 (Loading libgfortran.so clobbers C redirection of stdin/stdout/stderr)
...
PR libfortran/20788
* runtime/environ.c (init_unsigned_integer): Function for
environment variables we want to be positive.
(init_integer): Function to allow negative environment
variables (e.g. for GFORTRAN_STDIN_UNIT).
From-SVN: r97946
2005-04-10 10:37:59 +00:00
Thomas Koenig
1d1df67fa9
2005-05-10 Thomas Koenig <Thomas Koenig>
...
Removed erroneous line from Changelog.
From-SVN: r97944
2005-04-10 08:43:55 +00:00
Thomas Koenig
59afe4b424
[multiple changes]
...
2005-04-10 Thomas Koenig <Thomas.Koenig@online.de>
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.
From-SVN: r97943
2005-04-10 08:35:39 +00:00
Bud Davis
48248fa771
re PR libfortran/19872 ([4.0 only] closed and re-opened file not overwriten)
...
PR fortran/19872
* io/transfer.c (data_transfer_init): truncate an existing
file on the first write.
Co-Authored-By: Steven G. Kargl <kargls@comcast.net>
From-SVN: r97937
2005-04-10 03:43:09 +00:00
Thomas Koenig
50dd63a962
re PR libfortran/19106 ([4.0 only] segfault in executable for print *,sum(a,dim=2,mask=a>0))
...
2005-04-09 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/19106
PR libfortran/19014
* m4/ifunction.m4 (name`'rtype_qual`_'atype_code): ditto.
If retarray->data is NULL (i.e. the front end does not
know the rank and dimenson of the array), fill in its
properties and allocate memory.
Change the assertions about rank and dimension of retarray into
runtime errors and only check them for retarray->data != NULL.
Do the same for correcting the stride from 0 to 1 in retarray.
(`m'name`'rtype_qual`_'atype_code): Likewise.
* m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Likewise.
Change assertion about rank of array to runtime error.
(`m'name`'rtype_qual`_'atype_code): Likewise.
* generated/all_l4.c: Regenerated.
* generated/all_l8.c: Regenerated.
* generated/any_l4.c: Regenerated.
* generated/any_l8.c: Regenerated.
* generated/count_4_l4.c: Regenerated.
* generated/count_4_l8.c: Regenerated.
* generated/count_8_l4.c: Regenerated.
* generated/count_8_l8.c: Regenerated.
* generated/maxloc0_4_i4.c: Regenerated.
* generated/maxloc0_4_i8.c: Regenerated.
* generated/maxloc0_4_r4.c: Regenerated.
* generated/maxloc0_4_r8.c: Regenerated.
* generated/maxloc0_8_i4.c: Regenerated.
* generated/maxloc0_8_i8.c: Regenerated.
* generated/maxloc0_8_r4.c: Regenerated.
* generated/maxloc0_8_r8.c: Regenerated.
* generated/maxloc1_4_i4.c: Regenerated.
* generated/maxloc1_4_i8.c: Regenerated.
* generated/maxloc1_4_r4.c: Regenerated.
* generated/maxloc1_4_r8.c: Regenerated.
* generated/maxloc1_8_i4.c: Regenerated.
* generated/maxloc1_8_i8.c: Regenerated.
* generated/maxloc1_8_r4.c: Regenerated.
* generated/maxloc1_8_r8.c: Regenerated.
* generated/maxval_i4.c: Regenerated.
* generated/maxval_i8.c: Regenerated.
* generated/maxval_r4.c: Regenerated.
* generated/maxval_r8.c: Regenerated.
* generated/minloc0_4_i4.c: Regenerated.
* generated/minloc0_4_i8.c: Regenerated.
* generated/minloc0_4_r4.c: Regenerated.
* generated/minloc0_4_r8.c: Regenerated.
* generated/minloc0_8_i4.c: Regenerated.
* generated/minloc0_8_i8.c: Regenerated.
* generated/minloc0_8_r4.c: Regenerated.
* generated/minloc0_8_r8.c: Regenerated.
* generated/minloc1_4_i4.c: Regenerated.
* generated/minloc1_4_i8.c: Regenerated.
* generated/minloc1_4_r4.c: Regenerated.
* generated/minloc1_4_r8.c: Regenerated.
* generated/minloc1_8_i4.c: Regenerated.
* generated/minloc1_8_i8.c: Regenerated.
* generated/minloc1_8_r4.c: Regenerated.
* generated/minloc1_8_r8.c: Regenerated.
* generated/minval_i4.c: Regenerated.
* generated/minval_i8.c: Regenerated.
* generated/minval_r4.c: Regenerated.
* generated/minval_r8.c: Regenerated.
* generated/product_c4.c: Regenerated.
* generated/product_c8.c: Regenerated.
* generated/product_i4.c: Regenerated.
* generated/product_i8.c: Regenerated.
* generated/product_r4.c: Regenerated.
* generated/product_r8.c: Regenerated.
* generated/sum_c4.c: Regenerated.
* generated/sum_c8.c: Regenerated.
* generated/sum_i4.c: Regenerated.
* generated/sum_i8.c: Regenerated.
* generated/sum_r4.c: Regenerated.
* generated/sum_r8.c: Regenerated.
2005-04-09 Thomas Koenig <Thomas.Koenig@online.de>
* gfortran.fortran-torture/execute/intrinsic_anyall.f90:
Added test for callee-allocated arrays with write statements.
* gfortran.fortran-torture/execute/intrinsic_count.f90: Likewise.
* gfortran.fortran-torture/execute/intrinsic_mmloc.f90: Likewise.
* gfortran.fortran-torture/execute/intrinsic_mmval.f90: Likewise.
* gfortran.fortran-torture/execute/intrinsic_product.f90: Likewise.
* gfortran.fortran-torture/execute/intrinsic_sum.f90: Likewise.
From-SVN: r97929
2005-04-09 21:38:47 +00:00
Thomas Koenig
130bcb37be
re PR libfortran/20163 ([4.0 only] gfortran - error opening direct access file)
...
2005-04-09 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/20163
* runtime/string.c (compare0): Use fstrlen() to
strip trailing blanks from option string.
From-SVN: r97923
2005-04-09 19:37:14 +00:00
Andrew Pinski
53d8a8ac22
re PR fortran/13257 ([4.0 only] Error instead of warning for missing comma in format string)
...
PR fortran/13257
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.
From-SVN: r97919
2005-04-09 11:44:07 -07:00
Eric Botcazou
01d87b6f3d
backspace.c (unformatted_backspace): Do not dereference the pointer to the stream.
...
* io/backspace.c (unformatted_backspace): Do not dereference
the pointer to the stream.
From-SVN: r97851
2005-04-08 19:07:54 +00:00
Andrew Pinski
e87045f3ae
re PR libfortran/20766 ([darwin] - run time error when calling fortran subroutine from c)
...
2005-04-07 Andrew Pinski <pinskia@physics.uc.edu>
PR libfortran/20766
* configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
"-Wl,-single_module".
* configure: Regenerate.
* Makefile.am (libgfortran_la_LDFLAGS): Add extra_ldflags_libgfortran.
* Makefile.in: Regenerate.
From-SVN: r97804
2005-04-07 14:06:27 -07:00
Francois-Xavier Coudert
51e9d74cb8
re PR libfortran/20755 (gfortran - prints the same number with 1p4G12.3 two different ways)
...
PR libfortran/20755
* 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.
From-SVN: r97627
2005-04-05 14:20:10 +00:00
Dale Ranta
00f07d96bd
re PR libfortran/20068 (Backspace problems)
...
PR libfortran/20068
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.
Co-Authored-By: Francois-Xavier Coudert <coudert@clipper.ens.fr>
From-SVN: r97478
2005-04-03 08:07:43 +00:00
Francois-Xavier Coudert
14fd645e24
re PR libfortran/20660 (INQUIRE incorrectly reports the existence of UNITS)
...
PR libfortran/20660
* 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.
From-SVN: r97326
2005-03-31 15:30:06 +00:00
François-Xavier Coudert
82498ed4b9
re PR libfortran/20163 ([4.0 only] gfortran - error opening direct access file)
...
PR libfortran/20163
* io/open.c (st_open): call library_end() before returning even if
an error arises.
* gfortran.dg/pr20163-2.f: New test.
From-SVN: r97153
2005-03-29 08:37:32 +00:00
Francois-Xavier Coudert
94887ef478
re PR libfortran/19678 (DOS files don't work for list directed input)
...
PR libfortran/19678
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.
From-SVN: r97041
2005-03-25 13:35:29 +00:00
Francois-Xavier Coudert
a50f3cd3e6
re PR libfortran/15332 (colon edit descriptor not handled correctly)
...
PR libfortran/15332
* 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.
From-SVN: r97036
2005-03-25 07:04:27 +00:00
Francois-Xavier Coudert
ee4b41afc7
* config.h.in: Regenerate.
...
From-SVN: r96998
2005-03-24 17:55:31 +00:00
François-Xavier Coudert
85624ffd34
* libgfortran/io/write.c (output_float): fix typo in last commit.
...
From-SVN: r96958
2005-03-23 22:31:56 +00:00
François-Xavier Coudert
2852cd64d8
* libgfortran/Changelog: last commit had wrong date in Changelog
...
From-SVN: r96954
2005-03-23 21:45:04 +00:00
Francois-Xavier Coudert
fd4f678cf2
re PR libfortran/18025 (libgfortran: format, incompatible "minimum width" edit descriptor)
...
PR libfortran/18025
* write.c (output_float): Handling the "F0.d" format similarly as
commercial compilers.
* pr18025.f90: New test.
From-SVN: r96953
2005-03-23 21:42:10 +00:00
François-Xavier Coudert
f77b6ca3da
Makefile.am: Added new files.
...
* Makefile.am: Added new files.
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* configure.ac: add checks for signal.h headers file, as well as
following functions: chdir, strerror, getlogin, gethostname, kill,
link, symlink, perror, sleep, time.
* configure: Regenerate.
* intrinsics/chdir.c, intrinsics/gerror.c, intrinsics/getlog.c,
intrinsics/hostnm.c, intrinsics/ierrno.c, intrinsics/kill.c,
intrinsics/link.c, intrinsics/perror.c, intrinsics/rename.c,
intrinsics/sleep.c, intrinsics/symlnk.c, intrinsics/time.c: Newly
implementend g77 intrinsics.
* check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
gfc_check_perror): new functions to check newly implemented
g77 intrinsics.
* gfortran.h: adding symbols for new intrinsics.
* intrinsic.c (add_functions): adding new intrinsics.
(add_subroutines): adding new intrinsics.
* intrinsic.h: prototype for all checking and resolving
functions.
* iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
gfc_resolve_kill_sub, gfc_resolve_link_sub,
gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
gfc_resolve_perror): new functions to resolve intrinsics.
* trans-intrinsic.c (gfc_conv_intrinsic_function): add case
for new symbols.
* g77_intrinsics_funcs.f: New test.
* g77_intrinsics_sub.f: New test.
From-SVN: r96893
2005-03-22 22:08:22 +00:00
Zack Weinberg
140e859c6c
configure.ac: Do not invoke TL_AC_GCC_VERSION.
...
* configure.ac: Do not invoke TL_AC_GCC_VERSION.
In all substitutions, leave gcc_version to be expanded by the Makefile.
* aclocal.m4, configure: Regenerate.
* Makefile.am: Set gcc_version.
* Makefile.in: Regenerate.
From-SVN: r96818
2005-03-21 17:46:19 +00:00
François-Xavier Coudert
0376d694c2
* io.h: Setting higher default record length.
...
From-SVN: r96574
2005-03-16 19:33:07 +00:00
Francois-Xavier Coudert
2786eb77b2
open.c (new_unit): set record length to max_offset rather than using a hard-coded limit (which was...
...
* open.c (new_unit): set record length to max_offset rather than
using a hard-coded limit (which was too low).
* write_big_array.f90: New test.
From-SVN: r96573
2005-03-16 19:32:08 +00:00
Francois-Xavier Coudert
dcdeec06a0
write.c (output_float): special check when writing 0.0 with EN and ES formats.
...
* write.c (output_float): special check when writing 0.0 with
EN and ES formats.
* pr20480.f90: New test.
From-SVN: r96566
2005-03-16 18:09:03 +00:00
Francois-Xavier Coudert
0b2df4a703
[multiple changes]
...
2005-03-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
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
From-SVN: r96291
2005-03-11 08:03:02 +00:00
Toon Moene
5bae4ce839
ChangeLog: Fix typo in Peter O'Gorman's name.
...
2005-02-27 Toon Moene <toon@moene.indiv.nluug.nl>
* ChangeLog: Fix typo in Peter O'Gorman's name.
* runtime/environ.c: Update copyright years.
From-SVN: r95635
2005-02-27 20:59:02 +00:00
Tobias Schlüter
c7c61e5ec5
* io/write.c: Update copyright years.
...
From-SVN: r95630
2005-02-27 21:11:01 +01:00
Francois-Xavier Coudert
d8f92af2cf
re PR libfortran/20101 (zero prints incorrectly with 1pe12.4)
...
libgfortran/
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.
From-SVN: r95628
2005-02-27 20:47:12 +01:00
Tobias Schlüter
34d6d42fb4
write.c (output_float): Fix typo in condition.
...
libgfortran/
* io/write.c (output_float): Fix typo in condition.
gcc/testsuite/
* gfortran.dg/e_d_fmt.f90: New test.
From-SVN: r95615
2005-02-27 17:17:56 +01:00
Peter O'Gorman
b239be8150
re PR libfortran/17748 (libgfortran contains undefined references to _environ)
...
2005-02-26 Peter O'Gorman <peter@pogman.com>
Toon Moene <toon@moene.indiv.nluug.nl>
PR libgfortran/17748
* runtime/environ.c: Remove references to environ.
(show_variables): remove GFORTRAN_UNBUFFERED_* and
GFORTRAN_NAME_* because they require environ.
(pattern_scan): Remove function.
Co-Authored-By: Toon Moene <toon@moene.indiv.nluug.nl>
From-SVN: r95593
2005-02-26 18:33:11 +00:00
Bud Davis
397763d2af
[multiple changes]
...
2004-02-22 Paul Thomas <paulthomas2@wannado.fr>
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.
From-SVN: r95436
2005-02-23 04:09:17 +00:00
Bud Davis
ec88bf8bb7
[multiple changes]
...
2004-02-21 Bud Davis <bdavis@gfortran.org>
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.
From-SVN: r95379
2005-02-22 03:26:25 +00:00
Eric Botcazou
7442146939
re PR libfortran/19302 (intrinsic_nearest.f90 fails)
...
PR libfortran/19302
* intrinsics/c99_functions.c (nextafterf): Special-case infinite
numbers.
From-SVN: r95353
2005-02-21 21:39:33 +00:00
Steven G. Kargl
95b49c6f9d
* io/write.c(output_float): Typo in error message.
...
From-SVN: r95343
2005-02-21 19:59:58 +00:00
Steven G. Kargl
5920b5d2e8
re PR libfortran/20085 (iargc returns wrong count for number of program arguments)
...
PR 20085
* intrinsic/args.c (iargc): Off by 1.
From-SVN: r95302
2005-02-20 15:24:02 +00:00
Steven G. Kargl
d3f9c1b9bc
* intrinsic/date_and_time.c: Fix conformance problems.
...
From-SVN: r95284
2005-02-19 18:06:00 +00:00
Paul Thomas
e88334a68f
re PR libfortran/19363 (List directed write of Infinity and NaN has regressed)
...
2005-02-01 Paul Thomas <paulthomas2@wanadoo.fr>
PR libgfortran/19363
PR libgfortran/19691
* libgfortran.h (isfinite): Work around broken isfinite(x) in Cygwin.
From-SVN: r94530
2005-02-01 09:06:22 +00:00
Bud Davis
23e044cc1d
re PR libfortran/19647 (inquire(delim=) returns garbage)
...
2005-01-30 Bud Davis <bdavis@gfortran.org>
PR fortran/19647
* io/inquire.c (inquire_via_unit): Use correct variable for
pad.
* gfortan.dg/inquire_7.f90
From-SVN: r94439
2005-01-30 13:16:19 +00:00
Thomas Koenig
24a09741e4
re PR libfortran/19595 ([4.0 only] eor does not work)
...
2005-01-29 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/19595
* io/transfer.c (data_transfer_init): eor requires advance="NO".
testsuite/
* gfortran.dg/eor_1.f90: New test.
From-SVN: r94410
2005-01-29 15:45:17 +00:00
Tobias Schlüter
8dac1b213e
re PR libfortran/19524 (5 times uninitialized var in libgfortran)
...
PR libfortran/19524
* io/read.c (read_f): Don't free uninitialized pointer.
From-SVN: r94232
2005-01-25 22:40:25 +01:00
Paul Brook
2d304c90bd
Update Copyright.
...
From-SVN: r94118
2005-01-23 17:16:43 +00:00
James A. Morrison
587579571d
re PR fortran/19294 (intrinsic_transpose.f90 runtime crash)
...
2005-01-23 James A. Morrison <phython@gcc.gnu.org>
Paul Brook <paul@codesourcery.com>
PR fortran/19294
* iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
transpose_c8 for complex types.
libgfortran/
* Makefile.am: Add transpose_c4.c and transpose_c8.c.
* intrinsics/cshift0.c: Use separate optimized loops for complex types.
* m4/transpose.m4: Include type letter in function name.
* Makefile.in: Regenerate.
* generated/transpose_*.c: Regenerate.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r94116
2005-01-23 17:01:00 +00:00
Thomas Koenig
0e69bba9fc
re PR libfortran/19451 (Read after a write with a read only file)
...
2005-01-22 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/19451
* io/transfer.c (finalize_transfer): Don't do anything if
there is an error condition.
* open_readonly_1.f90: New test.
From-SVN: r94101
2005-01-23 02:18:33 +00:00
David Edelsohn
fbac336391
re PR libfortran/19052 (unit 0 not preconnected to standard error)
...
PR libgfortran/19052
* 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.
From-SVN: r94090
2005-01-22 19:14:31 -05:00
Thomas Koenig
d02b2c6474
re PR libfortran/18982 (open(status="new") does not generate an error if the file exists)
...
2005-01-22 Thomas Koenig <Thomas.Koenig@online.de>
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.
From-SVN: r94076
2005-01-22 19:49:18 +00:00
Tobias Schlüter
b8d5e92646
re PR fortran/19194 (Missing RECL parameter in OPEN statement)
...
gcc/fortran/
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.
From-SVN: r94065
2005-01-22 15:37:39 +01:00
Bud Davis
b1a807057e
re PR libfortran/19314 (inquire(position=) segfaults at runtime)
...
2004-01-22 Bud Davis <bdavis9659@comcast.net>
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.
From-SVN: r94060
2005-01-22 03:51:12 +00:00
Bud Davis
f53d3f9317
re PR libfortran/18778 (ENDFILE is not functionnal)
...
2005-01-16 Bud Davis <bdavis9659@comcast.net>
PR fortran/18778
* gfortran.dg/endfile_2.f90: New test.
* io/transfer.c (us_read): no bytes available is not a
runtime error.
From-SVN: r93737
2005-01-16 20:44:01 +00:00
Bud Davis
e1c74af03a
re PR libfortran/18983 (can't open /dev/null as an output file)
...
2005-01-15 Bud Davis <bdavis9659@comcast.net>
PR fortran/18983
* io/transfer.c (st_write_done): only truncate when it
is required.
2005-01-15 Bud Davis <bdavis9659@comcast.net>
PR fortran/18983
* gfortran.dg/write_to_null.f90: New test.
From-SVN: r93689
2005-01-15 08:10:23 +00:00
Toon Moene
57dea9f62e
re PR libfortran/19280 (Inconsistent licensing of libgfortran)
...
2005-01-12 Toon Moene <toon@moene.indiv.nluug.nl>
PR libfortran/19280
c99_protos.h: License changed to GPL+exception.
libgfortran.h: Ditto.
intrinsics/abort.c: Ditto.
intrinsics/args.c: Ditto.
intrinsics/associated.c: Ditto.
intrinsics/bessel.c: Ditto.
intrinsics/c99_functions.c: Ditto.
intrinsics/cpu_time.c: Ditto.
intrinsics/cshift0.c: Ditto.
intrinsics/date_and_time.c: Ditto.
intrinsics/env.c: Ditto.
intrinsics/eoshift0.c: Ditto.
intrinsics/eoshift2.c: Ditto.
intrinsics/erf.c: Ditto.
intrinsics/etime.c: Ditto.
intrinsics/exit.c: Ditto.
intrinsics/flush.c: Ditto.
intrinsics/fnum.c: Ditto.
intrinsics/getXid.c: Ditto.
intrinsics/getcwd.c: Ditto.
intrinsics/ishftc.c: Ditto.
intrinsics/mvbits.c: Ditto.
intrinsics/pack_generic.c: Ditto.
intrinsics/rand.c: Ditto.
intrinsics/random.c: Ditto.
intrinsics/reshape_generic.c: Ditto.
intrinsics/reshape_packed.c: Ditto.
intrinsics/size.c: Ditto.
intrinsics/spread_generic.c: Ditto.
intrinsics/stat.c: Ditto.
intrinsics/string_intrinsics.c: Ditto.
intrinsics/system.c: Ditto.
intrinsics/system_clock.c: Ditto.
intrinsics/transpose_generic.c: Ditto.
intrinsics/umask.c: Ditto.
intrinsics/unlink.c: Ditto.
intrinsics/unpack_generic.c: Ditto.
io/backspace.c: Ditto.
io/close.c: Ditto.
io/endfile.c: Ditto.
io/format.c: Ditto.
io/inquire.c: Ditto.
io/io.h: Ditto.
io/list_read.c: Ditto.
io/lock.c: Ditto.
io/open.c: Ditto.
io/read.c: Ditto.
io/rewind.c: Ditto.
io/transfer.c: Ditto.
io/unit.c: Ditto.
io/unix.c: Ditto.
io/write.c: Ditto.
m4/all.m4: Ditto.
m4/any.m4: Ditto.
m4/cexp.m4: Ditto.
m4/chyp.m4: Ditto.
m4/count.m4: Ditto.
m4/cshift1.m4: Ditto.
m4/ctrig.m4: Ditto.
m4/dotprod.m4: Ditto.
m4/dotprodc.m4: Ditto.
m4/dotprodl.m4: Ditto.
m4/eoshift1.m4: Ditto.
m4/eoshift3.m4: Ditto.
m4/exponent.m4: Ditto.
m4/fraction.m4: Ditto.
m4/head.m4: Ditto.
m4/iforeach.m4: Ditto.
m4/ifunction.m4: Ditto.
m4/in_pack.m4: Ditto.
m4/in_unpack.m4: Ditto.
m4/iparm.m4: Ditto.
m4/matmul.m4: Ditto.
m4/matmull.m4: Ditto.
m4/maxloc0.m4: Ditto.
m4/maxloc1.m4: Ditto.
m4/maxval.m4: Ditto.
m4/minloc0.m4: Ditto.
m4/minloc1.m4: Ditto.
m4/minval.m4: Ditto.
m4/mtype.m4: Ditto.
m4/nearest.m4: Ditto.
m4/pow.m4: Ditto.
m4/product.m4: Ditto.
m4/reshape.m4: Ditto.
m4/set_exponent.m4: Ditto.
m4/shape.m4: Ditto.
m4/specific.m4: Ditto.
m4/specific2.m4: Ditto.
m4/sum.m4: Ditto.
m4/transpose.m4: Ditto.
m4/types.m4: Ditto.
runtime/environ.c: Ditto.
runtime/error.c: Ditto.
runtime/in_pack_generic.c: Ditto.
runtime/in_unpack_generic.c: Ditto.
runtime/main.c: Ditto.
runtime/memory.c: Ditto.
runtime/normalize.c: Ditto.
runtime/pause.c: Ditto.
runtime/select.c: Ditto.
runtime/stop.c: Ditto.
runtime/string.c: Ditto.
generated/_abs_c4.f90: Regenerated.
generated/_abs_c8.f90: Regenerated.
generated/_abs_i4.f90: Regenerated.
generated/_abs_i8.f90: Regenerated.
generated/_abs_r4.f90: Regenerated.
generated/_abs_r8.f90: Regenerated.
generated/_acos_r4.f90: Regenerated.
generated/_acos_r8.f90: Regenerated.
generated/_aint_r4.f90: Regenerated.
generated/_aint_r8.f90: Regenerated.
generated/_anint_r4.f90: Regenerated.
generated/_anint_r8.f90: Regenerated.
generated/_asin_r4.f90: Regenerated.
generated/_asin_r8.f90: Regenerated.
generated/_atan2_r4.f90: Regenerated.
generated/_atan2_r8.f90: Regenerated.
generated/_atan_r4.f90: Regenerated.
generated/_atan_r8.f90: Regenerated.
generated/_conjg_c4.f90: Regenerated.
generated/_conjg_c8.f90: Regenerated.
generated/_cos_c4.f90: Regenerated.
generated/_cos_c8.f90: Regenerated.
generated/_cos_r4.f90: Regenerated.
generated/_cos_r8.f90: Regenerated.
generated/_cosh_r4.f90: Regenerated.
generated/_cosh_r8.f90: Regenerated.
generated/_dim_i4.f90: Regenerated.
generated/_dim_i8.f90: Regenerated.
generated/_dim_r4.f90: Regenerated.
generated/_dim_r8.f90: Regenerated.
generated/_exp_c4.f90: Regenerated.
generated/_exp_c8.f90: Regenerated.
generated/_exp_r4.f90: Regenerated.
generated/_exp_r8.f90: Regenerated.
generated/_log10_r4.f90: Regenerated.
generated/_log10_r8.f90: Regenerated.
generated/_log_c4.f90: Regenerated.
generated/_log_c8.f90: Regenerated.
generated/_log_r4.f90: Regenerated.
generated/_log_r8.f90: Regenerated.
generated/_mod_i4.f90: Regenerated.
generated/_mod_i8.f90: Regenerated.
generated/_mod_r4.f90: Regenerated.
generated/_mod_r8.f90: Regenerated.
generated/_sign_i4.f90: Regenerated.
generated/_sign_i8.f90: Regenerated.
generated/_sign_r4.f90: Regenerated.
generated/_sign_r8.f90: Regenerated.
generated/_sin_c4.f90: Regenerated.
generated/_sin_c8.f90: Regenerated.
generated/_sin_r4.f90: Regenerated.
generated/_sin_r8.f90: Regenerated.
generated/_sinh_r4.f90: Regenerated.
generated/_sinh_r8.f90: Regenerated.
generated/_sqrt_c4.f90: Regenerated.
generated/_sqrt_c8.f90: Regenerated.
generated/_sqrt_r4.f90: Regenerated.
generated/_sqrt_r8.f90: Regenerated.
generated/_tan_r4.f90: Regenerated.
generated/_tan_r8.f90: Regenerated.
generated/_tanh_r4.f90: Regenerated.
generated/_tanh_r8.f90: Regenerated.
generated/all_l4.c: Regenerated.
generated/all_l8.c: Regenerated.
generated/any_l4.c: Regenerated.
generated/any_l8.c: Regenerated.
generated/count_4_l4.c: Regenerated.
generated/count_4_l8.c: Regenerated.
generated/count_8_l4.c: Regenerated.
generated/count_8_l8.c: Regenerated.
generated/cshift1_4.c: Regenerated.
generated/cshift1_8.c: Regenerated.
generated/dotprod_c4.c: Regenerated.
generated/dotprod_c8.c: Regenerated.
generated/dotprod_i4.c: Regenerated.
generated/dotprod_i8.c: Regenerated.
generated/dotprod_l4.c: Regenerated.
generated/dotprod_l8.c: Regenerated.
generated/dotprod_r4.c: Regenerated.
generated/dotprod_r8.c: Regenerated.
generated/eoshift1_4.c: Regenerated.
generated/eoshift1_8.c: Regenerated.
generated/eoshift3_4.c: Regenerated.
generated/eoshift3_8.c: Regenerated.
generated/exp_c4.c: Regenerated.
generated/exp_c8.c: Regenerated.
generated/exponent_r4.c: Regenerated.
generated/exponent_r8.c: Regenerated.
generated/fraction_r4.c: Regenerated.
generated/fraction_r8.c: Regenerated.
generated/hyp_c4.c: Regenerated.
generated/hyp_c8.c: Regenerated.
generated/in_pack_i4.c: Regenerated.
generated/in_pack_i8.c: Regenerated.
generated/in_unpack_i4.c: Regenerated.
generated/in_unpack_i8.c: Regenerated.
generated/matmul_c4.c: Regenerated.
generated/matmul_c8.c: Regenerated.
generated/matmul_i4.c: Regenerated.
generated/matmul_i8.c: Regenerated.
generated/matmul_l4.c: Regenerated.
generated/matmul_l8.c: Regenerated.
generated/matmul_r4.c: Regenerated.
generated/matmul_r8.c: Regenerated.
generated/maxloc0_4_i4.c: Regenerated.
generated/maxloc0_4_i8.c: Regenerated.
generated/maxloc0_4_r4.c: Regenerated.
generated/maxloc0_4_r8.c: Regenerated.
generated/maxloc0_8_i4.c: Regenerated.
generated/maxloc0_8_i8.c: Regenerated.
generated/maxloc0_8_r4.c: Regenerated.
generated/maxloc0_8_r8.c: Regenerated.
generated/maxloc1_4_i4.c: Regenerated.
generated/maxloc1_4_i8.c: Regenerated.
generated/maxloc1_4_r4.c: Regenerated.
generated/maxloc1_4_r8.c: Regenerated.
generated/maxloc1_8_i4.c: Regenerated.
generated/maxloc1_8_i8.c: Regenerated.
generated/maxloc1_8_r4.c: Regenerated.
generated/maxloc1_8_r8.c: Regenerated.
generated/maxval_i4.c: Regenerated.
generated/maxval_i8.c: Regenerated.
generated/maxval_r4.c: Regenerated.
generated/maxval_r8.c: Regenerated.
generated/minloc0_4_i4.c: Regenerated.
generated/minloc0_4_i8.c: Regenerated.
generated/minloc0_4_r4.c: Regenerated.
generated/minloc0_4_r8.c: Regenerated.
generated/minloc0_8_i4.c: Regenerated.
generated/minloc0_8_i8.c: Regenerated.
generated/minloc0_8_r4.c: Regenerated.
generated/minloc0_8_r8.c: Regenerated.
generated/minloc1_4_i4.c: Regenerated.
generated/minloc1_4_i8.c: Regenerated.
generated/minloc1_4_r4.c: Regenerated.
generated/minloc1_4_r8.c: Regenerated.
generated/minloc1_8_i4.c: Regenerated.
generated/minloc1_8_i8.c: Regenerated.
generated/minloc1_8_r4.c: Regenerated.
generated/minloc1_8_r8.c: Regenerated.
generated/minval_i4.c: Regenerated.
generated/minval_i8.c: Regenerated.
generated/minval_r4.c: Regenerated.
generated/minval_r8.c: Regenerated.
generated/nearest_r4.c: Regenerated.
generated/nearest_r8.c: Regenerated.
generated/pow_c4_i4.c: Regenerated.
generated/pow_c4_i8.c: Regenerated.
generated/pow_c8_i4.c: Regenerated.
generated/pow_c8_i8.c: Regenerated.
generated/pow_i4_i4.c: Regenerated.
generated/pow_i4_i8.c: Regenerated.
generated/pow_i8_i4.c: Regenerated.
generated/pow_i8_i8.c: Regenerated.
generated/pow_r4_i4.c: Regenerated.
generated/pow_r4_i8.c: Regenerated.
generated/pow_r8_i4.c: Regenerated.
generated/pow_r8_i8.c: Regenerated.
generated/product_c4.c: Regenerated.
generated/product_c8.c: Regenerated.
generated/product_i4.c: Regenerated.
generated/product_i8.c: Regenerated.
generated/product_r4.c: Regenerated.
generated/product_r8.c: Regenerated.
generated/reshape_i4.c: Regenerated.
generated/reshape_i8.c: Regenerated.
generated/set_exponent_r4.c: Regenerated.
generated/set_exponent_r8.c: Regenerated.
generated/shape_i4.c: Regenerated.
generated/shape_i8.c: Regenerated.
generated/sum_c4.c: Regenerated.
generated/sum_c8.c: Regenerated.
generated/sum_i4.c: Regenerated.
generated/sum_i8.c: Regenerated.
generated/sum_r4.c: Regenerated.
generated/sum_r8.c: Regenerated.
generated/transpose_i4.c: Regenerated.
generated/transpose_i8.c: Regenerated.
generated/trig_c4.c: Regenerated.
generated/trig_c8.c: Regenerated.
From-SVN: r93235
2005-01-12 21:27:33 +00:00
Bud Davis
a7e8d7dbe7
re PR libfortran/18398 (Formatted I/O problems)
...
2005-01-07 Bud Davis <bdavis9659@comcast.net>
PR fortran/18398
* transfer.c (next_record_r): always skip the
eol search if it was found during sf_read.
* gfortran.dg/fmt_read.f90: New test.
From-SVN: r93035
2005-01-07 03:25:47 +00:00
Tobias Schlüter
963fe80802
Fix typo in ChangeLog
...
From-SVN: r92643
2004-12-27 17:43:47 +01:00
Tobias Schlüter
56746a0745
trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to logicalshift.
...
gcc/fortran/
* trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
logicalshift. Call fold. Remove 0-bit shift shortcut.
(gfc_conv_intrinsic_ishftc): Convert first argument to at least
4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
result if width(arg 1) < 4 bytes. Call fold.
libgfortran/
* libgfortran/libgfortran.h (GFC_UINTEGER_1, GFC_UINTEGER_2):
Define.
* intrinsics/ishftc.c: Update copyright years.
(ishftc8): Change 'shift' and 'size' to GFC_INTEGER_4.
* intrinsics/mvbits.c: Correcty non-ASCII character in my name.
Add implementations for GFC_INTEGER_1 and GFC_INTEGER_2.
gcc/testsuite/
* gfortran.dg/g77/f90-intrinsic-bit.f: New.
From-SVN: r92642
2004-12-27 17:43:25 +01:00
Bud Davis
5d3a981694
re PR libfortran/19071 (complex formatted output has too many items)
...
2004-12-23 Bud Davis <bdavis9659@comcast.net>
PR fortran/19071
* io/tranfer.c (formatted_transfer): moved check for
format reversion inside the processing loop.
* gfortran.dg/complex_write.f90: New test.
From-SVN: r92582
2004-12-24 00:29:07 +00:00
Aaron W. LaFramboise
9548f05908
libgfortran.h (itoa): Rename to gfc_itoa.
...
* libgfortran.h (itoa): Rename to gfc_itoa.
* io/write.c (itoa): Same.
* runtime/environ.c (itoa): Same.
* runtime/error.c (itoa): Same.
From-SVN: r92380
2004-12-19 12:54:00 -06:00
Bud Davis
c8c83c1828
re PR libfortran/17597 (list directed read has error)
...
2004-12-15 Bud Davis <bdavis9659@comcast.net>
Steven G. Kargl <kargls@comcast.net>
PR fortran/17597
* io/list_read.c (read_real): do not push back a comma when
it delimits a real value without a decimal point
2004-12-15 Bud Davis <bdavis9659@comcast.net>
Steven G. Kargle <kargls@comcast.net>
PR fortran/17597
* gfortran.dg/list_read_3.f90: New test.
Co-Authored-By: Steven G. Kargl <kargls@comcast.net>
Co-Authored-By: Steven G. Kargl <kargls@comcast.net>
From-SVN: r92190
2004-12-15 12:42:39 +00:00
Tobias Schlüter
cf77e601e5
Fix date on ChangeLog
...
From-SVN: r92163
2004-12-14 23:00:54 +01:00
Steve Ellcey
0865674700
transfer.c (us_read): Use memcpy/memset instead of assignment to fill unaligned buffer.
...
* libgfortran/io/transfer.c (us_read): Use memcpy/memset
instead of assignment to fill unaligned buffer.
(us_write): Ditto.
(next_record_w): Ditto.
From-SVN: r92143
2004-12-14 16:34:08 +00:00
Steven G. Kargl
985791f6fe
re PR libfortran/18966 (cshift etc. not implemented for kind=1 and kind=2 actual arguments)
...
PR libfortran/18966
* gfortran.h: typedef GFC_INTEGER_1 and GFC_INTEGER_2
* intrinsics/cshift0.c (cshift0_1,cshift0_2): New functions.
* intrinsics/eoshift0.c (eoshift0_1,eoshift0_2): New functions.
* intrinsics/eoshift2.c (eoshift2_1,eoshift2_2): New functions.
From-SVN: r92132
2004-12-14 10:43:36 +00:00
David Edelsohn
681b5028d9
* io/transfer.c (read_sf): Change bitwise "and" to logical "and".
...
From-SVN: r92094
2004-12-13 11:06:57 -05:00
Richard Henderson
7f68c75fb3
iresolve.c (gfc_resolve_all, [...]): Use PREFIX.
...
gcc/fortran/
* iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
gfc_resolve_unpack: Use PREFIX.
libgfortran/
* intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
intrinsics/pack_generic.c, intrinsics/reshape_generic.c,
intrinsics/spread_generic.c, intrinsics/transpose_generic.c,
intrinsics/unpack_generic.c, m4/cshift1.m4, m4/dotprod.m4,
m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4,
m4/iforeach.m4, m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4,
m4/reshape.m4, m4/shape.m4, m4/transpose.m4: Use standard prefix
instead of "__".
* generated/*: Rebuild.
From-SVN: r92075
2004-12-12 18:47:58 -08:00
Richard Henderson
7d7b8bfe55
acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
...
* acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
(LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT): New.
(LIBGFOR_CHECK_ATTRIBUTE_ALIAS): New.
* configure.ac: Use them.
* configure, config.h.in, aclocal.m4: Rebuild.
* libgfortran.h (prefix): Remove.
(PREFIX, IPREFIX): New.
(sym_rename, sym_rename1, sym_rename2): New.
(internal_proto, export_proto, export_proto_np): New.
(iexport_proto, iexport): New.
(iexport_data_proto, iexport_data): New.
* intrinsics/abort.c, intrinsics/args.c, intrinsics/associated.c,
intrinsics/cpu_time.c, intrinsics/cshift0.c,
intrinsics/date_and_time.c, intrinsics/env.c, intrinsics/eoshift0.c,
intrinsics/eoshift2.c, intrinsics/etime.c, intrinsics/exit.c,
intrinsics/flush.c, intrinsics/fnum.c, intrinsics/getXid.c,
intrinsics/getcwd.c, intrinsics/ishftc.c, intrinsics/mvbits.c,
intrinsics/pack_generic.c, intrinsics/rand.c, intrinsics/random.c,
intrinsics/reshape_generic.c, intrinsics/size.c,
intrinsics/spread_generic.c, intrinsics/stat.c,
intrinsics/string_intrinsics.c, intrinsics/system.c,
intrinsics/system_clock.c, intrinsics/transpose_generic.c,
intrinsics/umask.c, intrinsics/unlink.c, intrinsics/unpack_generic.c,
io/backspace.c, io/close.c, io/endfile.c, io/inquire.c, io/io.h,
io/open.c, io/rewind.c, io/transfer.c, libgfortran.h, m4/cshift1.m4,
m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4,
m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/iforeach.m4,
m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/nearest.m4,
m4/pow.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4,
m4/transpose.m4, runtime/environ.c, runtime/error.c,
runtime/in_pack_generic.c, runtime/in_unpack_generic.c,
runtime/main.c, runtime/memory.c, runtime/pause.c, runtime/select.c,
runtime/stop.c: Use them to mark symbols internal or external.
* generated/*: Rebuild.
From-SVN: r92045
2004-12-12 00:59:05 -08:00
David Edelsohn
ad87ad6788
re PR bootstrap/18895 (libgfortran AM_MAKEFLAGS arg list + environment too large)
...
PR bootstrap/18895
Revert 2004-12-07 change.
* Makefile.am (AM_MAKEFLAGS): Delete.
* Makefile.in: Regenerate.
From-SVN: r91955
2004-12-09 11:31:19 -05:00
Steve Ellcey
7dd42019e7
Makefile.am (AM_MAKEFLAGS): New.
...
* libgfortran/Makefile.am (AM_MAKEFLAGS): New.
* libgfortran/Makefile.in: Regenerate
From-SVN: r91844
2004-12-08 00:43:34 +00:00
Steve Ellcey
6ecf6dcbb8
io.h (open_external): Change prototype.
...
* io/io.h (open_external): Change prototype.
* io/unix.c (regular_file): Change prototype and set flags->action if
needed.
(open_external): Ditto.
* io/open.c (new_unit): Let open_external set flags->action.
From-SVN: r91843
2004-12-08 00:32:39 +00:00
Eric Botcazou
6e4d9244f7
configure.ac: Check for ieeefp.h.
...
* configure.ac: Check for ieeefp.h. Check for fabsf in libm.
* configure: Regenerate.
* config.h.in: Likewise.
* c99_protos.h: New file.
* libgfortran.h: Include c99_protos.h and conditionally ieeefp.h.
* intrinsics/c99_functions.c (fabsf): New function.
From-SVN: r91832
2004-12-07 23:43:40 +00:00
Richard Henderson
07d3cebe24
cshift0.c, [...]: Use internal_malloc_size instead of internal_malloc.
...
* intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
intrinsics/pack_generic.c, intrinsics/string_intrinsics.c,
intrinsics/transpose_generic.c, m4/ifunction.m4, m4/matmul.m4,
m4/matmull.m4, m4/transpose.m4: Use internal_malloc_size instead
of internal_malloc.
* generated/*: Rebuild.
From-SVN: r91799
2004-12-06 16:24:44 -08:00
Richard Henderson
f21edfd62d
c99_functions.c, [...]: Whitespace fixes.
...
* intrinsics/c99_functions.c, intrinsics/eoshift0.c,
intrinsics/eoshift2.c, intrinsics/exit.c, intrinsics/flush.c,
intrinsics/ishftc.c, intrinsics/mvbits.c, intrinsics/pack_generic.c,
intrinsics/random.c, intrinsics/reshape_generic.c, intrinsics/size.c,
intrinsics/spread_generic.c, intrinsics/stat.c,
intrinsics/string_intrinsics.c, intrinsics/system_clock.c,
intrinsics/transpose_generic.c, intrinsics/unlink.c,
intrinsics/unpack_generic.c, io/backspace.c, io/format.c,
io/list_read.c, io/lock.c, io/open.c, io/transfer.c, io/unix.c,
io/write.c, runtime/environ.c, runtime/error.c,
runtime/in_pack_generic.c, runtime/in_unpack_generic.c, runtime/main.c,
runtime/memory.c, runtime/pause.c, runtime/stop.c,
runtime/string.c: Whitespace fixes.
From-SVN: r91794
2004-12-06 16:01:01 -08:00
Richard Henderson
a8bc7089b5
Makefile.am: Generate all m4 output under $(srcdir).
...
* Makefile.am: Generate all m4 output under $(srcdir).
* Makefile.in: Regenerate.
From-SVN: r91788
2004-12-06 13:29:57 -08:00
Tobias Schlüter
abd7fea9f9
re PR libfortran/18710 (img part of complex number not written to direct access file)
...
libgfortran/
PR fortran/18710
* io/transfer.c (unformatted_read, unformatted_write): width of
a COMPLEX is twice its kind.
gcc/testsuite/
PR fortran/18170
* gfortran.dg/direct_io_3.f90: New test.
From-SVN: r91656
2004-12-02 20:39:15 +01:00
Richard Sandiford
afabd8e62c
Introduce and use config/gcc-version.m4.
...
From-SVN: r91625
2004-12-02 11:05:13 +00:00
Bud Davis
78579b601d
re PR libfortran/18284 (BACKSPACE broken)
...
2004-12-02 Bud Davis <bdavis9659@comcast.net>
PR libfortran/18284
* io/unix.c (fd_alloc_w_at): Update file_length when extending.
* io/backspace.c (formatted_backspace): Reset endfile after backspace.
PR fortran/18284
* gfortran.dg/backspace.f90
From-SVN: r91612
2004-12-02 04:29:00 +00:00
Steven G. Kargl
f177a08700
flush.c: New file.
...
2004-12-02 Steven G. Kargl <kargls@comcast.net>
Paul Brook <paul@codesourcery.com>
libgfortran/
* intrinsics/flush.c: New file.
* intrinsics/fnum.c: ditto
* intrinsics/stat.c: ditto
* io/io.h (unit_to_fd): Add prototype.
* io/unix.c (unit_to_fd): New function.
* configure.ac: Add test for members of struct stat. Check for
sys/types.h and sys/stat.h
* Makefile.am: Add intrinsics/{flush.c,fnum.c,stat.c}
* configure.in: Regenerate.
* config.h.in: Regenerate.
* Makefile.in: Regenerate.
fortran/
* check.c (gfc_check_flush, gfc_check_fnum): New functions.
(gfc_check_fstat, gfc_check_fstat_sub): New functions.
(gfc_check_stat, gfc_check_stat_sub): New functions.
* gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
* intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
fstat, and stat to intrinsics symbol tables.
* intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
(gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
* iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
(gfc_resolve_stat, gfc_resolve_flush): New functions.
(gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
* trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
From-SVN: r91611
2004-12-02 04:20:09 +00:00
Bud Davis
8dc4d66aa7
inquire.c (inquire_via_unit): do not allow a direct access file to be opened for sequential I/O.
...
2004-12-02 Bud Davis <bdavis9659@comcast.net>
* io/inquire.c (inquire_via_unit): do not allow a direct access
file to be opened for sequential I/O.
* gfortran.dg/inquire.f90: New test.
From-SVN: r91610
2004-12-02 04:13:21 +00:00
Steven G. Kargl
df65f0938c
flush.c: New file.
...
2004-12-02 Steven G. Kargl <kargls@comcast.net>
Paul Brook <paul@codesourcery.com>
libgfortran/
* intrinsics/flush.c: New file.
* intrinsics/fnum.c: ditto
* intrinsics/stat.c: ditto
* io/io.h (unit_to_fd): Add prototype.
* io/unix.c (unit_to_fd): New function.
* configure.ac: Add test for members of struct stat. Check for
sys/types.h and sys/stat.h
* Makefile.am: Add intrinsics/{flush.c,fnum.c,stat.c}
* configure.in: Regenerate.
* config.h.in: Regenerate.
* Makefile.in: Regenerate.
fortran/
* check.c (gfc_check_flush, gfc_check_fnum): New functions.
(gfc_check_fstat, gfc_check_fstat_sub): New functions.
(gfc_check_stat, gfc_check_stat_sub): New functions.
* gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
* intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
fstat, and stat to intrinsics symbol tables.
* intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
(gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
* iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
(gfc_resolve_stat, gfc_resolve_flush): New functions.
(gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
* trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r91609
2004-12-02 04:10:26 +00:00
Aaron W. LaFramboise
f49b3d3628
Makefile.am (AM_CPPFLAGS): Use -iquote instead of -I.
...
2004-12-01 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* Makefile.am (AM_CPPFLAGS): Use -iquote instead of -I.
From-SVN: r91602
2004-12-02 00:42:12 +00:00
R. Kelley Cook
0d0a093554
Correct my erronous ChangeLog entries.
...
From-SVN: r91496
2004-11-29 23:51:45 +00:00
Bud Davis
905d47a950
direct_io_2.f90: New test.
...
2004-11-28 Bud Davis <bdavis9659@comcast.net>
* gcc/gcc/gfortran.dg/direct_io_2.f90: New test.
* gcc/libgfortran/io/unix.c (mmap_alloc_w_a): check for a write
to a location less than the mapped area.
From-SVN: r91426
2004-11-28 21:14:02 +00:00
Bud Davis
203f344c3d
re PR libfortran/18364 (endfile does not truncate file)
...
2004-11-27 Bud Davis <bdavis9659@comcast.net>
PR fortran/18364
* gfortran.dg/endfile.f90: New test.
* io/endfile.c (st_endfile): flush the stream before truncating.
From-SVN: r91400
2004-11-27 23:35:47 +00:00
Kelley Cook
767f726e10
libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Revert previous change.
...
2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
* libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Revert previous change.
* boehm-gc/configure: Regenerate.
* libffi/configure: Regenerate.
* libgfortran/configure: Regenerate.
* libjava/configure: Regenerate.
* libobjc/configure: Regenerate.
* libstdc++-v3/configure: Regenerate.
* zlib/configure: Regenerate.
From-SVN: r91293
2004-11-25 13:43:43 +00:00
Kelley Cook
2c92e90fa5
libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Import linux-gnu case from CVS libtool to always pass_all.
...
2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
* libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Import linux-gnu case
from CVS libtool to always pass_all.
* boehm-gc/configure: Regenerate.
* libffi/configure: Regenerate.
* libgfortran/configure: Regenerate.
* libjava/configure: Regenerate.
* libobjc/configure: Regenerate.
* libstdc++-v3/configure: Regenerate.
* zlib/configure: Regenerate.
From-SVN: r91200
2004-11-24 22:04:38 +00:00
Steven Bosscher
69d3c9a43e
re PR libfortran/15960 (missing function 'finite' on HP-UX 11.11)
...
PR libfortran/15960
* configure.ac: Check for finite in libm.
* libgfortran.h: Define isfinite macro if not defined.
* intrinsics/c99_functions.c: Use defined(fpclassify) instead of
HAVE_FPCLASSIFY.
* io/write.c (write_float): Use isfinite instead of finite.
* configure, config.h.in: Rebuilt.
From-SVN: r91064
2004-11-23 02:02:38 +00:00
Roger Sayle
b10cf17380
* io/write.c (write_float, list_formatted_write): Fix indentation.
...
From-SVN: r90975
2004-11-21 05:08:14 +00:00
Eric Botcazou
3969c39f61
re PR libfortran/16135 (libfortran doesn't build, use of C99 types)
...
PR target/16135
* acinclude.m4 (LIBGFOR_TARGET_ILP32): New check.
* configure.ac: Include LIBGFOR_TARGET_ILP32.
* configure: Regenerate.
* config.h.in: Likewise.
* libgfortran.h: Provide default definitions for C99 types
on ILP32 targets that don't have them.
PR target/17999
* configure.ac: Check for snprintf.
* configure: Regenerate.
* config.h.in: Likewise.
* intrinsics/date_and_time.c (date_and_time): Do not
use snprinf if it is not available.
* io/write.c (output_float): Likewise.
From-SVN: r90964
2004-11-20 13:15:17 +00:00
Paul Brook
edca1aa6ec
Really regenerate Makefile.in.
...
From-SVN: r90950
2004-11-20 01:57:41 +00:00
Steven G. Kargl
d8fe26b2cd
check.c (gfc_check_getcwd_sub): Fix seg fault.
...
* check.c (gfc_check_getcwd_sub): Fix seg fault.
* check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
gfc_check_unlink,gfc_check_unlink_sub): New functions
* gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
* intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
exit to intrinsics symbol tables.
* intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
gfc_resolve_unlink_sub): Add and sort prototypes.
* iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
* trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
libgfortran/
* Makefile.am: Add intrinsics/{umask.c,unlink.c,exit.c}
* Makefile.in: Regenerated
* intrinsics/umask.c: New file
* intrinsics/unlink.c: ditto
* intrinsics/exit.c: ditto
From-SVN: r90949
2004-11-20 01:44:49 +00:00
Victor Leikehman
410d3bbaa2
Modified Files:
...
ChangeLog generated/matmul_c4.c generated/matmul_c8.c
generated/matmul_i4.c generated/matmul_i8.c
generated/matmul_r4.c generated/matmul_r8.c m4/matmul.m4
2004-11-18 Victor Leikehman <lei@il.ibm.com>
* m4/matmul.m4: Loops reordered to improve cache behavior.
* generated/matmul_??.c: Regenerated.
From-SVN: r90853
2004-11-18 08:45:11 +00:00
Paul Brook
9686c8110e
Committed wrong version of previous patch.
...
From-SVN: r90384
2004-11-10 02:44:39 +00:00
Paul Brook
2cbcdebaf9
re PR fortran/18218 (Miscompare in sixtrack benchmark caused by loss of precision)
...
PR fortran/18218
* configure.ac: Check for strtof.
* configure: Regenerate.
* config.h.in: Regenerate.
* io/read.c (convert_real): Use strtof if available.
(convert_precision_real): Remove.
(read_f): Avoid poor exponentiation algorithm.
gcc/testsuite/
* gfortran.dg/list_read.c: New test.
From-SVN: r90382
2004-11-10 02:19:27 +00:00
Andreas Schwab
c7a35fe9f3
configure.ac: Use AC_PROG_FC, FC and FCFLAGS instead of AC_PROG_F77, F77 and FFLAGS.
...
* configure.ac: Use AC_PROG_FC, FC and FCFLAGS instead of
AC_PROG_F77, F77 and FFLAGS.
* Makefile.am (selected_int_kind.inc, selected_real_kind.inc): Use
FCCOMPILE instead of F77COMPILE.
* configure, Makefile.in: Regenerate.
From-SVN: r90122
2004-11-05 12:50:53 +00:00
Kelley Cook
d49ec2d1a8
acinclude.m4: Properly quote AC_CACHE_CHECK.
...
2004-11-05 Kelley Cook <kcook@gcc.gnu.org>
* acinclude.m4: Properly quote AC_CACHE_CHECK.
* Makefile.am: Add in ACLOCAL_AMFLAGS.
* aclocal.m4, configure, Makefile.in: Regenerate.
From-SVN: r90114
2004-11-05 03:49:25 +00:00
Aaron W. LaFramboise
41724e6a13
config.h.in: Regenerate.
...
2004-10-30 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac (AC_CHECK_FUNCS): Add mkstemp.
* io/unix.c (S_IRGRP): Define if undefined.
(S_IWGRP): Same.
(S_IROTH): Same.
(S_IWOTH): Same.
(tempfile): Use mktemp if mkstemp missing, fix typos.
From-SVN: r89893
2004-10-30 16:23:23 +00:00
Aaron W. LaFramboise
47289a4e33
Missing bit of previous patch.
...
2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* unix.c: Include stdio.h.
From-SVN: r89892
2004-10-30 15:15:27 +00:00
Aaron W. LaFramboise
8cfe17f951
system.c ("libgfortran.h"): Move after system headers.
...
2004-10-30 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* intrinsics/system.c ("libgfortran.h"): Move after system headers.
From-SVN: r89891
2004-10-30 15:04:20 +00:00
Canqun Yang
7a003d8e2e
check.c (gfc_check_rand): Allow missing optional argument.
...
2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
* check.c (gfc_check_rand): Allow missing optional argument.
(gfc_check_irand): Ditto.
* intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
libgfortran/
* intrinsics/rand.c (irand): Handle NULL argument.
From-SVN: r89886
2004-10-30 14:18:34 +00:00
Paul Brook
5615e8cdce
transfer.c (finalize_transfer): Free internal streams.
...
* io/transfer.c (finalize_transfer): Free internal streams.
* io/unix.c (mem_close): Free stream object.
From-SVN: r88709
2004-10-07 21:30:50 +00:00
Paul Brook
82e7998648
string_intrinsics.c (string_verify): Fix off by one error.
...
* intrinsics/string_intrinsics.c (string_verify): Fix off by one
error.
testsuite/
* gfortran.dg/intrinsic_verify_1.f90: New test.
From-SVN: r88704
2004-10-07 20:19:32 +00:00
Paul Brook
7726f633fa
re PR libfortran/17709 (NULL I/O list and Format error.)
...
PR libfortran/17709
* io/transfer.c (data_transfer_init): Reset sf_seen_eor.
testsuite/
* gfortran.dg/empty_format_1.f90: New test.
From-SVN: r88615
2004-10-06 18:27:58 +00:00
Andrew Pinski
1ee3acfb08
mvbits.c: Commit the file.
...
2004-10-04 Andrew Pinski <pinskia@physics.uc.edu>
* intrinsics/mvbits.c: Commit the file.
From-SVN: r88541
2004-10-04 19:31:10 -07:00
Tobias Schlüter
5b1374e965
re PR fortran/17776 (no subroutine system)
...
fortran/
PR fortran/17776
* check.c (gfc_check_system_sub): New function.
* gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
* intrinsic.c (add_functions): Add 'system'.
(add_subroutines): Add 'system'.
* intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
Move prototypes to other suborutines.
(gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
Add prototype.
(gfc_resolve_system_clock): Fix formatting of prototype.
* iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
functions.
* trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
GFC_ISYM_SYSTEM.
libgfortran/
PR fortran/17776
* intrinsics/system.c: New file.
* Makefile.am: Add dependency for the new file.
* Makefile.in: Regenerate.
From-SVN: r88532
2004-10-04 23:30:32 +02:00
Tobias Schlüter
ee569894e7
re PR libfortran/17631 (libfortran: intrinsic subroutine MVBITS not implemented)
...
PR fortran/17631
fortran/
* intrinsic.c (add_sym_5): Remove.
(add_subroutines): Add resolution function for MVBITS.
* intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
MVBITS
* iresolve.c (gfc_resolve_mvbits): New function.
(gfc_resolve_random_number): Remove empty line at end of function.
libgfortran/
* Makefile.am (gfor_helper_src): Add intrinsics/mvbits.h.
* intrinsics/mvbits.h: New file.
testsuite/
* gfortran.fortran-torture/execute/intrinsic_mvbits.f90: New test.
From-SVN: r88527
2004-10-04 22:49:39 +02:00
Tobias Schlüter
58c5b409e8
re PR fortran/17283 (UNPACK issues)
...
PR fortran/17283
fortran/
* iresolve.c (gfc_resolve_pack): Choose function depending if mask is
scalar.
libgfortran/
* intrinsics/pack_generic.c (__pack): Allocate memory for return array
if not done by caller.
(__pack_s): New function.
* runtime/memory.c (internal_malloc, internal_malloc64): Allow
allocating zero memory.
testsuite/
* gfortran.fortran-torture/execute/intrinsic_pack.f90: Add more tests.
From-SVN: r88526
2004-10-04 21:27:29 +02:00
Paul Brook
06e4f02a16
re PR libfortran/17706 (reading a value of 0.0 gives a value of -0.0)
...
2004-10-04 Paul Brook <paul@codesourcery.com>
Bud Davis <bdavis9659@comcast.net>
PR fortran/17706
PR fortran/16434
* io/format.c (parse_format_list): Set repeat count for S, SP, SS,
BN and BZ formats.
* io/write.c (output_float): Don't output minus zero.
libgfortran/
* gfortran/pr17706.f90: New test.
* gfortran.dg/g77/f77-edit-s-out.f: Remove xfail.
Actually apply the patch this time.
From-SVN: r88513
2004-10-04 15:33:18 +00:00
Paul Brook
f3e4170112
re PR libfortran/17706 (reading a value of 0.0 gives a value of -0.0)
...
2004-10-04 Paul Brook <paul@codesourcery.com>
Bud Davis <bdavis9659@comcast.net>
PR fortran/17706
PR fortran/16434
* io/format.c (parse_format_list): Set repeat count for S, SP, SS,
BN and BZ formats.
* io/write.c (output_float): Don't output minus zero.
libgfortran/
* gfortran/pr17706.f90: New test.
* gfortran.dg/g77/f77-edit-s-out.f: Remove xfail.
Co-Authored-By: Bud Davis <bdavis9659@comcast.net>
From-SVN: r88512
2004-10-04 15:32:13 +00:00
Aaron W. LaFramboise
830219eec1
abort.c ("libgfortran.h"): Move.
...
2004-10-03 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* intrinsics/abort.c ("libgfortran.h"): Move.
* intrinsics/date_and_time.c ("libgfortran.h"): Same.
* intrinsics/write.c ("libgfortran.h"): Same.
From-SVN: r88444
2004-10-03 12:04:15 +00:00
Tobias Schlüter
bf4d99cf13
re PR libfortran/16137 (Fortran compiler unable to produce executables as libfortran depends on C99 math functions)
...
PR libfortran/16137
* config.h.in (HAVE_POWF): Undefine.
* configure.ac: Check for 'powf' in library.
* configure: Regenerate.
* intrinsics/c99_functions.c (powf): New function.
From-SVN: r88128
2004-09-26 16:52:04 +02:00
Tobias Schlüter
487c67b637
* intrinsics/etime.c (etime_): New function.
...
From-SVN: r88052
2004-09-24 18:49:10 +02:00
Steven G. Kargl
c6847e25b9
libgfortran.h: define gfc_alloca()
...
2004-09-21 Steven G. Kargl <kargls@comcast.net>
* libgfortran.h: define gfc_alloca()
* intrinsics/env.c (getenv, get_environment_variable_i4): Use it.
From-SVN: r87801
2004-09-21 14:38:34 +02:00
Bud Davis
77747e5f2d
re PR libfortran/17286 (namelist containing more than one value cannot contain whitespace or newlines for READ)
...
2004-09-21 Bud Davis <bdavis9659@comcast.net>
PR fortran/17286
* io/list_read.c (namelist_read): ignore spaces after
the '=' for namelist reads.
2004-09-21 Bud Davis <bdavis9659@comcast.net>
PR fortran/17286
* gfortran.dg/pr17286.f90: New test.
From-SVN: r87799
2004-09-21 11:22:47 +00:00
Aaron W. LaFramboise
f596fc98ea
config.h.in: Regenerate.
...
2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac (AC_CHECK_HEADERS): Check for sys/mman.h.
* unix.c: Include stdio.h.
(HAVE_SYS_MMAN_H): Check.
(PROT_READ, PROT_WRITE): Provide default definitions.
From-SVN: r87714
2004-09-18 23:55:22 +00:00
Steven G. Kargl
0110c1ec15
check.c (gfc_check_getcwd_sub): New function.
...
2004-09-15 Steven G. Kargl <kargls@comcast.net>
* check.c (gfc_check_getcwd_sub): New function.
* gfortran.h (GFC_ISYM_GETCWD): New symbol.
* intrinsic.c (add_functions): Add function definition;
Use symbol.
* intrinsic.c (add_subroutines): Add subroutine definitions.
* intrinsic.h: Add prototypes.
* iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
New functions.
* trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
libgfortran/
* intrincics/getcwd.c: New file.
* Makefile.am: Add getcwd.c.
* Makefile.in: Regenerated.
From-SVN: r87555
2004-09-15 14:17:26 +00:00
Steven G. Kargl
a8c60d7fff
check.c (gfc_check_getcwd_sub): New function.
...
2004-09-15 Steven G. Kargl <kargls@comcast.net>
* check.c (gfc_check_getcwd_sub): New function.
* gfortran.h (GFC_ISYM_GETCWD): New symbol.
* intrinsic.c (add_functions): Add function definition;
Use symbol.
* intrinsic.c (add_subroutines): Add subroutine definitions.
* intrinsic.h: Add prototypes.
* iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
New functions.
* trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
libgfortran/
* intrinsics/getcwd.c: New file.
* Makefile.am: Add getcwd.c.
* Makefile.in: Regenerated.
From-SVN: r87552
2004-09-15 14:09:17 +00:00
Paul Brook
a8ea34ebed
Fix typo.
...
From-SVN: r87548
2004-09-15 13:02:08 +00:00
Steven G. Kargl
3869a92c04
env.c (getenv, [...]): Remove trailing white space.
...
2004-09-15 Steven G. Kargl <kargls@comcast.net>
Paul Brook <paul@codesourcery.com>
* intrinsics/env.c (getenv, get_environmental_variable): Remove
trailing white space. Uase alloca. Honour trim_name.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r87547
2004-09-15 12:59:22 +00:00
Bud Davis
c72477d6a6
re PR libfortran/17090 (Runtime I/O error)
...
2004-09-13 Bud Davis <bdavis9659@comcast.net>
PR fortran/17090
* io/list_read.c (list_formatted_read): Handle trailing spaces
at end of line.
2004-09-13 Bud Davis <bdavis9659@comcast.net>
PR fortran/17090
* gfortran.dg/pr17090.f90: New test.
From-SVN: r87474
2004-09-14 00:56:46 +00:00
Paul Brook
8a57cd3d5e
Put ChangeLog entry in the right place.
...
From-SVN: r87120
2004-09-06 16:58:16 +00:00
Paul Brook
2cada022f1
[multiple changes]
...
2004-09-06 Steven G. Kargl <kargls@comcast.net>
* io/write.c (output_float): Typo in comment. Remove debugging
printf. Fix format for FP of form 1e10.
2004-09-06 Paul Brook <paul@codesourcery.com>
* gfortran.dg/edit_real_1.f90: Add new test.
From-SVN: r87119
2004-09-06 16:33:52 +00:00
Richard Henderson
803a6ff52c
cshift0.c (DEF_COPY_LOOP, [...]): New.
...
* intrinsics/cshift0.c (DEF_COPY_LOOP, copy_loop_int, copy_loop_long,
copy_loop_double, copy_loop_ldouble): New.
(__cshift0): Make shift type ssize_t. Use % operator instead of
div. Use specialized versions of copy loop depending on the shape.
From-SVN: r87045
2004-09-03 12:03:43 -07:00
Paul Brook
d809264e86
format.c (parse_format_list): Set repeat count for P descriptors.
...
* io/format.c (parse_format_list): Set repeat count for P descriptors.
* write.c (output_float): Fix condition. Correctly handle nonzero
scale factor.
testsuite/
* gfortran.dg/edit_real_1.f90: Add new tests.
From-SVN: r86952
2004-09-02 01:33:01 +00:00
Eric Botcazou
130abd1728
mk-sik-inc.sh: Use a temporary string instead of 'echo -n'.
...
* mk-sik-inc.sh: Use a temporary string instead of 'echo -n'.
* mk-srk-inc.sh: Likewise.
From-SVN: r86919
2004-09-01 17:51:42 +00:00
Paul Brook
244fada7d0
error.c (generate_error): Set both iostat and library_return.
...
* runtime/error.c (generate_error): Set both iostat and
library_return.
testsuite/
* gfortran.dg/eof_2.f90: New test.
From-SVN: r86852
2004-08-31 23:43:21 +00:00
Paul Brook
334ff453ea
re PR libfortran/16805 (Runtime failure using list directed read from string)
...
PR libfortran/16805
* io/list_read.c (next_char): Don't signal EOF for internal files.
* io/unix.c (mem_alloc_r_at): Don't return NULL for incomplete reads.
testsuite/
2004-08-31 Bud Davis <bdavis9659@comcast.net>
* gfortran.dg/list_read_2.f90: New test.
From-SVN: r86844
2004-08-31 20:37:43 +00:00
Tobias Schlüter
43b4305759
unit.c: Separate copyright years by ','.
...
* io/unit.c: Separate copyright years by ','.
(compare, insert_unit, delete_unit, is_internal_unit, close_units):
Remove blank line in beginning of function.
(get_unit): Simplify code.
From-SVN: r86841
2004-08-31 21:49:33 +02:00
Paul Brook
8a210b0fb0
* io/unit.c (get_unit): Remove superfluous if.
...
From-SVN: r86838
2004-08-31 18:59:42 +00:00
Paul Brook
bd72d66cb5
transfer.c (read_sf): Rename uinty to readlen.
...
* io/transfer.c (read_sf): Rename uinty to readlen. Detect EOF.
(finalize_transfer): Move setjmp after namlist IO.
* io/unix.c (mem_alloc_r_at): Calculate remaining length correctly.
testsuite/
* gfortran.dg/eof_1.f90: New test.
From-SVN: r86831
2004-08-31 15:53:31 +00:00
Paul Brook
c789f36b21
list_read.c (eat_separator): Set at_eo when a '/' is seen.
...
* list_read.c (eat_separator): Set at_eo when a '/' is seen.
testsuite/
* gfortran.dg/list_read_1.f90: New file.
From-SVN: r86830
2004-08-31 14:56:09 +00:00