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
Tobias Schlüter
d7177ab25e
trans-decl.c, [...]: Replace all occurences of 'gfc_strlen_type_node' by 'gfc_charlen_type_node'.
...
fortran/
* trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
all occurences of 'gfc_strlen_type_node' by
'gfc_charlen_type_node'.
* trans-types.h: Same. Also update comment accordingly.
libgfortran/
* libgfortran.h: Replace 'gfc_strlen_type' by
'gfc_charlen_type'. Update comment accordingly.
* intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c:
Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'.
From-SVN: r86828
2004-08-31 16:06:48 +02:00
Paul Brook
da17f5599e
trans-types.h: Add comments.
...
* trans-types.h: Add comments.
(intmax_type_node, string_type_node, const_string_type_node): Remove.
libgfortran/
* libgfortran.h: Add comments.
From-SVN: r86810
2004-08-30 23:28:56 +00:00
Richard Henderson
625be28635
Makefile.am (gfor_helper_src): Split selected_kind.f90.
...
* Makefile.am (gfor_helper_src): Split selected_kind.f90.
(gfor_built_src): Add selected_int_kind.inc selected_real_kind.inc.
(selected_int_kind.inc selected_real_kind.inc): New rules.
* Makefile.in: Regenerate.
* mk-sik-inc.sh, mk-srk-inc.sh: New files.
* intrinsics/selected_int_kind.f90: Split from selected_kind.f90,
include table of detected kinds.
* intrinsics/selected_real_kind.f90: Similarly.
From-SVN: r86801
2004-08-30 14:34:37 -07:00
Steven G. Kargl
048c989961
bessel.c: New file.
...
2004-08-29 Steven G. Kargl <kargls@comcast.net>
Paul Brook <paul@codesourcery.com>
* intrinsics/bessel.c: New file.
* intrinsics/erf.c: New file.
* Makefie.am: Add intrinsics/bessel.c and intrinsics/erf.c.
* configure.ac: Test for C99 Bessel and Error functions.
* Makefile.in: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
From-SVN: r86728
2004-08-29 16:31:16 +00:00
Steven G. Kargl
e8525382d9
check.c (gfc_check_besn, [...]): New functions.
...
2004-08-29 Steven G. Kargl <kargls@comcast.net>
Paul Brook <paul@codesourcery.com>
* check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
* f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
(DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
(build_builtin_fntypes): New function.
(gfc_init_builtin_functions): Use it.
* gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
and GFC_ISYM_ERF{,C}.
(gfc_c_int_kind): Declare.
* intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
* intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
gfc_resolve_g77_math1): Add prototypes.
* resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
* mathbuiltins.def: Add comment. Change third argument. Use
DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
* trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
(DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
* trans-types.c (gfc_c_int_kind): Declare.
(gfc_init_kinds): Set it.
testsuite/
* gfortran.dg/g77/README: Update.
* gfortran.dg/g77/erfc.f: Copy from g77.f-torture.
* gfortran.dg/g77/intrinsic-unix-bessel.f: Ditto.
* gfortran.dg/g77/intrinsic-unix-erf.f: Ditto.
libgfortran/
* intrinsics/bessel.c: New file.
* intrinsics/erf.c: New file.
* Makefie.am: Add intrinsics/bessel.c and intrinsics/erf.c.
* configure.ac: Test for C99 Bessel and Error functions.
* Makefile.in: Regenerate.
* config.h.in: Regenerate.
* configure: Regenerate.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r86727
2004-08-29 15:58:16 +00:00
Steven G. Kargl
4c0c6b9f2c
gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
...
2004-08-29 Steven G. Kargl <kargls@comcast.net>
Paul Brook <paul@codesourcery.com>
* gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
(gfc_check_f, gfc_simplify_f): Add f0.
* intrinsic.c (do_check): Call f0. Flatten.
(add_sym_0): Fix prototype. Set f0.
(add_functions): Add getgid, getgid and getuid.
(resolve_intrinsic): Remove obsolete comment.
(do_simplify): Call f0.
* intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
gfc_resolve_getuid): Add prototypes.
* iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
gfc_resolve_getuid): New functions.
* trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
GFC_ISYM_GET?ID.
libgfortran/
* Makefile.am: Add intrinsics/getXid.c.
* configure.ac: Add tests for get{g,p,u}id.
* config.h.in: Regenerate.
* Makefile.in: Regenerate.
* configure: Regenerate.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r86703
2004-08-28 23:43:41 +00:00
Paul Brook
7984a2f04b
re PR libfortran/17195 (Infinite loop in output_float in libgfortran/io/write.c)
...
PR libfortran/17195
* libgfortran.h (rtoa): Remove prototype.
* runtime/error.c (rtoa): Remove.
* io/write.c (calculate_G_format): Don't add blanks if E format is
used. Add correct number of blanks when exponent width is specified.
(output_float): Rewrite.
testsuite/
* gfortran.dg/edit_real_1.f90: New test.
From-SVN: r86701
2004-08-28 19:48:02 +00:00
Paul Brook
e041cc5aff
Comment typo.
...
From-SVN: r86660
2004-08-27 14:37:13 +00:00
Paul Brook
c100eff11e
rewind.c (st_rewind): Reset unit to read mode.
...
* io/rewind.c (st_rewind): Reset unit to read mode.
testsuite/
* gfortran.dg/rewind_1.f90: New test.
From-SVN: r86659
2004-08-27 13:44:52 +00:00
Bud Davis
55948b693e
re PR libfortran/16597 (gfortran: bug in unformatted I/O on scratch files)
...
2004-08-27 Bud Davis <bdavis9659@comcast.net>
PR fortran/16597
* io/io.h: created typedef for unit_mode.
* io/io.h (gfc_unit): added mode to unit structure.
* io/transfer.c (data_transfer_init): flush if a write then
read is done on a unit (direct access files).
* io/rewind.c (st_rewind): Used unit mode instead of global.
* gfortran.dg/pr16597.f90: New test.
From-SVN: r86654
2004-08-27 07:59:30 +00:00
Tobias Schlüter
20edd06b2f
io.h, [...]: Fix formatting issues, update copyright years.
...
* io/io.h, io/list_read.c, io/open.c, io/transfer.c, io/write.c:
Fix formatting issues, update copyright years.
(Add Previously missing ChangeLog entry)
From-SVN: r86621
2004-08-26 15:25:16 +02:00
Bud Davis
5352bda03e
re PR libfortran/17143 (2**63 prints garbage)
...
2004-08-24 Bud Davis <bdavis9659@comcast.net>
PR fortran/17143
* runtime/error.c (itoa): keep from overflowing during
mod operation by using unsigned variable.
* gfortran.dg/pr17143.f90: New test.
From-SVN: r86532
2004-08-25 00:31:33 +00:00
Bud Davis
02d735f6bd
re PR libfortran/17164 (index function not working properly)
...
2004-08-24 Bud Davis <bdavis9659@comcast.net>
PR fortran/17164
* runtime/string_intrinsics.c (string_index):check for
substring longer than string.
* gfortran.dg/pr17164.f90: New test.
From-SVN: r86527
2004-08-25 00:14:07 +00:00
David Edelsohn
6fd7cc5419
Makefile.am (libgfortran_la_LDFLAGS): Add -lm.
...
* Makefile.am (libgfortran_la_LDFLAGS): Add -lm.
* Makefile.in: Rebuilt.
From-SVN: r86486
2004-08-24 11:20:52 -04:00
R. Kelley Cook
2709e6af02
ignore autom4te.cache
...
From-SVN: r86446
2004-08-23 23:51:56 +00:00
Tobias Schlüter
7fcb18047a
io.h, [...]: Fix formatting issues, update copyright years.
...
* io/io.h, io/list_read.c, io/open.c, io/transfer.c, io/write.c:
Fix formatting issues, update copyright years.
From-SVN: r86425
2004-08-23 16:28:31 +02:00
Paul Brook
22e4cb8c23
Fix typo.
...
From-SVN: r86363
2004-08-21 13:23:13 +00:00
Bud Davis
0fa1b65cad
re PR libfortran/16908 (Segfault in libgfortran/io/transfer.c)
...
2004-08-21 Bud Davis <bdavis9659@comcast.net>
PR 16908
* io/transfer.c (next_record_w): Do not blank pad.
* io/transfer.c (next_record): Take into account partial records.
testsuite/
* gfortran.dg/direct_io.f90: New test.
From-SVN: r86361
2004-08-21 11:20:29 +00:00
Victor Leikehman
3bc268e64b
re PR fortran/13278 (derived type namelist I/O support missing, causes ICE)
...
2004-08-18 Victor Leikehman <lei@il.ibm.com>
PR fortran/13278
* trans-io.c (transfer_namelist_element): New. Recursively handle
derived-type variables. Pass string lengths.
(build_dt): Code moved to build_namelist, with some
changes and additions.
(gfc_build_io_library_fndecls): Declare the fifth
argument in st_set_nml_var_char -- string_length.
libgfortran/
* io/transfer.c (st_set_nml_var)
* io/write.c (namelist_write): Allow var_name and var_name_len to be
null. For strings, use string_length field instead of len.
* io/io.h (struct namelist_type): New field string_length.
(st_set_nml_var_char): New argument string_length.
From-SVN: r86166
2004-08-18 01:20:06 +00:00
Bud Davis
4fe6e46bcd
Corrected typo in PR number, previous commit
...
From-SVN: r85969
2004-08-13 22:25:06 +00:00
Bud Davis
1ef02b9de5
re PR libfortran/16935 (Segmentation fault of compiler with unsupported control items in OPEN)
...
2004-08-13 Bud Davis <bdavis9659@comcast.net>
PR gfortran/13965
* gfortran.fortran-torture/execute/open_rewind.f90: New test.
* io/open.c (st_open): use flags instead of the unit structure.
From-SVN: r85966
2004-08-13 22:01:02 +00:00
Victor Leikehman
a57bb5f6a5
list_read.c (namelist_read): Convert variable names to lower case, so that mixed-case names are recognized.
...
2004-08-10 Victor Leikehman <lei@il.ibm.com>
* io/list_read.c (namelist_read): Convert variable names
to lower case, so that mixed-case names are recognized.
Don't read beyond terminating slash.
From-SVN: r85751
2004-08-10 13:34:04 +00:00
Roger Sayle
067a5735c5
c99_functions.c (nextafterf): New implementation that works correctly with denormalized numbers.
...
* intrinsics/c99_functions.c (nextafterf): New implementation that
works correctly with denormalized numbers.
From-SVN: r85724
2004-08-09 21:09:41 +00:00
Victor Leikehman
883c9d4d12
matmul.m4, [...]: Allocate space if return value has NULL in its data field.
...
2004-09-09 Victor Leikehman <lei@il.ibm.com>
* m4/matmul.m4, m4/matmull.m4, intrinsics/eoshift0.c,
intrinsics/eoshift2.c, intrinsics/transpose_generic.c:
Allocate space if return value has NULL in its data field.
* generated/*.c: Regenerate.
From-SVN: r85717
2004-08-09 14:34:39 +00:00
Janne Blomqvist
aa6fc63508
intrinsic.c (add_subroutines): Add getenv and get_environment_variable.
...
2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
* intrinsic.c (add_subroutines): Add getenv and
get_environment_variable. (add_sym_5s): New function.
* intrinsic.h (gfc_resolve_get_environment_variable): Add
prototype.
* iresolve.c (gfc_resolve_get_environment_variable): New
function.
libgfortran/
* intrinsics/env.c: New file.
* Makefile.am: Add env.c to build.
* Makefile.in: Regenerate.
testsuite/
* gfortran.dg/getenv_1.f90: New test.
From-SVN: r85656
2004-08-06 21:47:03 +00:00
Victor Leikehman
943bf8b513
Commit for Victor Leikehman <lei@il.ibm.com>
...
PR libgfortran/16704
* io/read.c (read_radix): Understand letters f and F as hex digits.
From-SVN: r85596
2004-08-05 08:37:42 +00:00
Victor Leikehman
6c167c45b1
* libgfortran.h (array_t, size0) New declarations.
...
* m4/ifunction.m4, m4/transpose.m4, intrinsics/cshift0.c: Allocate
space if return value descriptor has NULL in its data field,
and initialize bounds and stride.
* intrinsics/size.c (array_t, size0): Declarations moved to
libgfortran.h.
* generated/*.c: Regenerate.
From-SVN: r85558
2004-08-04 14:30:46 +00:00
Roger Sayle
453310d80b
re PR libfortran/16137 (Fortran compiler unable to produce executables as libfortran depends on C99 math functions)
...
PR libgfortran/16137
* configure.ac: Add tests for acosf, asinf, atan2f, atanf, ceilf,
copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
scalbnf, sinf, sinhf, sqrtf, tanf and tanhf in libm.
* config.h.in: Regenerate.
* configure: Regenerate.
* instrinsics/c99_functions.c (acosf, asinf, atan2f, atanf, ceilf,
copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
nextafterf, scalbnf, sinf, sinhf, sqrtf, tanf, tanhf): New stub
implementations for targets that don't support C99 float functions.
From-SVN: r85473
2004-08-03 13:28:26 +00:00
Roger Sayle
023d776a11
write.c (write_float): Use the slightly more portable isnan in preference to isinf.
...
* io/write.c (write_float): Use the slightly more portable isnan
in preference to isinf.
From-SVN: r85407
2004-08-01 13:40:52 +00:00
Bud Davis
9cdc381b1a
configure.ac: Add check for LFS support.
...
2004-07-18 Bud Davis <bdavis9659@comcast.net>
* configure.ac: Add check for LFS support.
* configure: Regenerate
From-SVN: r84890
2004-07-18 12:46:39 +00:00
Paul Brook
1e38f15929
re PR fortran/16303 (Complex logarithm function sometimes chooses a non-principal branch)
...
PR fortran/16303
* m4/cexp.m4 (carg): Return -pi to pi.
* generated/exp_c?.c: Regenerate.
From-SVN: r84516
2004-07-11 16:05:08 +00:00
Andreas Krebbel
dbe81a8b25
re PR libfortran/16291 (F2003 formatting of Inf /Nan on irix6.5)
...
PR fortran/16291
* libgfortran/io/write.c: (write_float): Added length check.
Remove pointless memset calls.
From-SVN: r84308
2004-07-08 19:58:56 +00:00
Bud Davis
bf1df0a046
re PR libfortran/15472 (implicit open for unformatted file causes run-time error)
...
2004-07-04 Bud Davis <bdavis9659@comcast.net>
Paul Brook <paul@codesourcery.com>
PR fortran/15472
* io/transfer.c(us_write): set recl for seq unform writes to max size.
* io/transfer.c(data_transfer_init): handle un-opened seq unform unit.
* io/unix.c(fd_alloc_w_at): handle requests at start, fd_flush at
right time.
* io/unix.c(is_seekable): set based upon the file/device, not the
method being used to access it (fd or mmap).
* io/unix.c(fd_flush): don't set file_size if !seekable.
* io/unix.c(fd_truncate: ditto.
* gfortran.fortran-torture/execute/seq_io.f90: New test.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r84104
2004-07-05 01:19:08 +00:00
Janne Blomqvist
b41b25345b
re PR libfortran/15280 (Fortran9x commandline not accessable)
...
PR fortran/15280
PR fortran/15665
* gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
GFC_ISYM_COMMAND_ARGUMENT_COUNT.
* intrinsic.c (add_functions): Identify iargc. Add
command_argument_count.
(add_subroutines): Resolve getarg. Add get_command and
get_command_argument.
* intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
gfc_resolve_get_command_argument): Add prototypes.
* iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
gfc_resolve_get_command_argument): New functions.
* trans-decl.c (gfor_fndecl_iargc): New variable.
(gfc_build_intrinsic_function_decls): Set it.
* trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
(gfc_conv_intrinsic_function): Use it.
* trans.h (gfor_fndecl_iargc): Declare.
libgfortran/
* libgfortran.h (gfc_strlen_type): Define.
* intrinsics/args.c (getarg): Rename ...
(getarg_i4): ... to this.
(getarg_i8, get_command_argument_i4, get_command_argument_i8,
get_command_i4, get_command_i8): New functions.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r84087
2004-07-04 17:00:12 +00:00
Matthias Klose
1657a8095b
libtool-version: New.
...
2004-07-04 Matthias Klose <doko@debian.org>
* libtool-version: New.
* Makefile.am (libgfortran_la_LDFLAGS): Use -version-info for soname.
* Makefile.in: Regenerate.
* configure.ac: Remove libtool_VERSION macro
* configure: Regenerate
From-SVN: r84074
2004-07-04 09:06:54 +00:00
Steve Kargl
fd53dbe051
rand.c (rand): Wrap the irand() call from the previous commit in prefix.
...
* intrinsics/rand.c (rand): Wrap the irand() call from the previous
commit in prefix.
Co-Authored-By: Steven Bosscher <stevenb@suse.de>
From-SVN: r83895
2004-06-30 08:21:54 +00:00
Tobias Schlüter
beabab5904
Paul Brook <paul@codesourcery.com>
...
2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
Paul Brook <paul@codesourcery.com>
* runtime/normalize.c (normalize_r4_i4, normalize_r8_i8): Fix
comments.
* intrinsics/rand.c (rand): Call irand() in call to normalize_r4_i4.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r83880
2004-06-30 00:52:58 +02:00
Bud Davis
519b0e16cd
re PR libfortran/12839 (incorrect IO of Inf)
...
2004-06-27 Bud Davis <bdavis9659@comcast.net>
PR gfortran/12839
* io/write.c (write_float): check signbit for Infinity.
From-SVN: r83757
2004-06-28 01:30:26 +00:00
Bud Davis
3e14aaa2aa
re PR libfortran/16196 (gfortran fails to create file with OPEN(...,status='REPLACE'))
...
2004-06-26 Bud Davis <bdavis9659@comcast.net>
PR gfortran/16196
* unix.c(regular_file): create file if it does not exist.
* gfortran.fortran-torture/execute/open_replace.f90: New test case.
From-SVN: r83709
2004-06-26 11:49:06 +00:00
Andrew Pinski
d42093a1db
darwin7.h (MATH_LIBRARY): Remove.
...
gcc/ChangeLog:
* config/darwin7.h (MATH_LIBRARY): Remove.
(LIB_SPEC): Define.
* config/darwin.h (MATH_LIBRARY): Define always to empty.
(LIB_SPEC): Only define if not already defined.
libstdc++/ChangeLog:
* linkage.m4: Remove check for libmx.
* configure: Regenerate.
libgfortran/ChangeLog:
* configure.ac: Remove check for libmx.
* configure: Regenerate.
From-SVN: r83603
2004-06-24 10:53:07 -07:00
Janne Blomqvist
8750f9cdec
re PR fortran/15750 (IOLENGTH form of INQUIRE statement not implemented)
...
PR fortran/15750
* io.c (gfc_match_inquire): Bugfix for iolength related stuff.
(gfc_resolve_inquire): Resolve the iolength tag. Return
SUCCESS at end of function if no failure has occured.
* resolve.c (resolve_code): Resolve if iolength is encountered.
* trans-io.c: (ioparm_iolength, iocall_iolength,
iocall_iolength_done): New variables.
(last_dt): Add IOLENGTH.
(gfc_build_io_library_fndecls ): Set iolength related variables.
(gfc_trans_iolength): Implement.
(gfc_trans_dt_end): Treat iolength as a third form of data transfer.
libgfortran/
PR fortran/15750
* inquire.c (st_inquire): Add comment
* io.h (st_parameter): Add iolength.
(st_iolength, st_iolength_done): Declare.
* transfer.c (iolength_transfer, iolength_transfer_init,
st_iolength, st_iolength_done): New functions.
testsuite/
* gfortran.fortran-torture/execute/iolength_1.f90: New test.
* gfortran.fortran-torture/execute/iolength_3.f90: New test.
From-SVN: r83472
2004-06-22 00:43:55 +00:00
Steven G. Kargl
0bf68c6eab
etime.c (etime_sub): Remove array rank check; Add check for sufficient space.
...
* etime.c (etime_sub): Remove array rank check;
Add check for sufficient space.
From-SVN: r83456
2004-06-21 22:25:12 +00:00
Bud Davis
bb9db7b136
re PR libfortran/16080 (segmentation fault when reading empty string)
...
2004-06-19 Bud Davis <bdavis9659@comcast.net>
PR gfortran/16080
* io/list_read.c(set_value): fixed spelling.
From-SVN: r83389
2004-06-19 17:03:16 +00:00
Bud Davis
04b0faec08
re PR libfortran/16080 (segmentation fault when reading empty string)
...
2004-06-19 Bud Davis <bdavis9659@comcast.net>
PR gfortran/16080
* gfortran.fortran-torture/execute/read_null_string.f90: New file.
* io/list_read.c(set_value): don't copy if the string is null.
From-SVN: r83388
2004-06-19 16:42:05 +00:00
Bud Davis
bc20e36d16
re PR libfortran/15292 (libgfortran depends on c99 functionality round and roundf)
...
2004-06-14 Bud Davis <bdavis9659@comcast.net>
PR gfortran/15292
* intrinsics/c99_functions.c: Use fpclassify if it exists.
From-SVN: r83116
2004-06-14 17:27:20 +00:00
Paul Brook
a9e7b9d395
Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
...
* Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
* configure.ac: Add checks for nextafter and nextafterf.
* Makefile.in, config.h.in, configure: Regenerate.
* libgfortran.h (normalize_r4_i4, normalize_r8_i8): Declare.
* intrinsics/rand.c (rand): Use normalize_r4_i4.
* intrinsics/random.c (random_r4): Use normalize_r4_i4.
(random_r8): Use normalize_r8_i8.
* runtime/normalize.c: New file.
testsuite/
* gfortran.fortran-torture/execute/random_2.f90: New test.
From-SVN: r83070
2004-06-13 22:58:30 +00:00
Steven G. Kargl
cdaa9fc44c
random.c: Fix several spelling and formatting mistakes in comments.
...
* random.c: Fix several spelling and formatting mistakes in
comments.
(random_r8): Fix loop to make random numbers range in [0,1(.
Co-Authored-By: Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
From-SVN: r83063
2004-06-13 20:25:53 +02:00
Tobias Schlüter
9d409075cb
random.c (random_r4): Burn a random number.
...
2004-06-13 Steven G. Kargl <kargls@comcast.net>
* random.c (random_r4): Burn a random number.
(random_r8): fix infinite loop.
From-SVN: r83062
2004-06-13 19:48:23 +02:00
Bud Davis
a2a2059fd7
re PR libfortran/15292 (libgfortran depends on c99 functionality round and roundf)
...
PR gfortran/15292
* intrinsics/c99_functions.c: New file.
* Makefile.am: Add new file.
* configure.ac: Added test for round/roundf.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.h.in: Regenerate.
From-SVN: r83036
2004-06-12 17:59:30 +00:00
Steven G. Kargl
2bd7494908
check.c (gfc_check_second_sub, [...]): New functions.
...
* check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
* gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
* trans-intrinsic.c: Use symbols.
* intrinsic.c (add_sym_2s): New function.
* intrinsic.c: Add etime, dtime, irand, rand, second, srand.
* intrinsic.h: Function prototypes.
* iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
gfc_resolve_srand): New functions.
libgfortran
* Makefile.am: Add rand.c and etime.c
* Makefile.in: Regenerated.
* aclocal.in: Regenerated.
* cpu_time.c (second_sub, second): New functions.
* rand.c (irand, rand, srand): New file.
* etime.c (etime_sub, etime): New file.
From-SVN: r83034
2004-06-12 17:34:47 +00:00
Tobias Schlüter
f814193b9d
re PR libfortran/14923 (gfortran misses the DATE_AND_TIME intrinsic)
...
PR fortran/14923
* intrinsics/date_and_time.c: New file.
* Makefile.am (gfor_helper_src): Add intrinsics/date_and_time.c.
* Makefile.in, aclocal.m4: Regenerate.
* libgfortran.h: Prototype date_and_time().
testsuite/
* gfortran.fortran-torture/execute/date_time_1.f90: New test.
Co-Authored-By: Steven Bosscher <stevenb@suse.de>
From-SVN: r83032
2004-06-12 15:15:41 +00:00
Tobias Schlüter
a13c75880a
PR fortran/15665 Fixup ChangeLog from my previous commit
...
From-SVN: r83030
2004-06-12 16:50:49 +02:00
Tobias Schlüter
c5dc831c5e
PR fortran/15655Fixup ChangeLog entries from previous commit by Paul Brook
...
From-SVN: r83029
2004-06-12 16:09:43 +02:00
Bud Davis
4aef80f8e0
args.c: Implement GETARG and IARGC.
...
* intrinsics/args.c: Implement GETARG and IARGC.
* Makefile.am: Add it.
* Makefile.in: Regenerate.
testsuite/
* gfortran.fortran-torture/execute/getarg_1.f90: New test.
From-SVN: r83027
2004-06-12 13:42:46 +00:00
Bud Davis
8204210bd6
re PR libfortran/12839 (incorrect IO of Inf)
...
2004-06-12 Bud Davis <bdavis9659@comcast.net>
PR gfortran/12839
* gfortran.fortran-torture/execute/nan_inf_fmt.f90: New test.
* io/write.c(write_float): format inf and nan IAW F2003.
From-SVN: r83024
2004-06-12 12:50:54 +00:00
Bud Davis
898c05b8bd
re PR libfortran/14897 ('T' edit descriptor output incorrect)
...
2004-06-09 Bud Davis <bdavis9659@comcast.net>
PR gfortran/14897
* gfortran.fortran-torture/execute/t_edit.f90
* io/transfer.c (formatted_transfer): position is unique
for T and TL edit descriptors.
(data_transfer_init): set record length to size of internal
file.
From-SVN: r82808
2004-06-09 01:03:02 +00:00
Bud Davis
31b6f11ab0
re PR libfortran/15755 (gfortran: backspace call causes bus error)
...
2004-06-08 Bud Davis <bdavis9659@comcast.net>
PR gfortran/15755
* gfortran.fortran-torture/execute/backspace.c : New test.
* io/backspace.c(st_backspace): call correct routine for
formatted and un-formatted units.
From-SVN: r82806
2004-06-09 00:55:04 +00:00
Andreas Jaeger
96b8a6154e
re PR libfortran/11800 ([gfortan] libgfortran should be multi-libed)
...
PR gfortran/11800
* Makefile.am (AM_CPPFLAGS): Renamed from INCLUDES.
(lib_LTLIBRARIES): Rename to ...
(toolexeclib_LTLIBRARIES): this for multilib support.
* configure.in: Rename to ...
* configure.ac: this. Update to modern autoconf style, enable
multilibs, support --enable-version-specific-runtime-libs.
* Makefile.in: Regenerated.
* configure: Regenerated.
* aclocal.m4: Regenerated.
From-SVN: r82466
2004-05-30 23:58:10 +02:00
Steven G. Kargl
5f251c2603
iresolve.c (gfc_resolve_random_number): Clean up conditional.
...
* iresolve.c (gfc_resolve_random_number): Clean up conditional.
libgfortran/
* libgfortran.h (random_seed): Update prototype.
* intrinsics/random.c: Disable old implementation and add new one.
testsuite/
* gfortran.fortran-torture/execute/random_1.f90: New test.
From-SVN: r82443
2004-05-30 10:49:50 +00:00
Andreas Jaeger
ebeb17c7bb
random.c: Include unistd.h for close and read prototypes...
...
* intrinsics/random.c: Include unistd.h for close and read
prototypes, remove unneeded inclusion of assert.h.
* intrinsics/abort.c: Include stdlib.h for abort prototype, remove
unneeded inclusion of assert.h.
From-SVN: r82442
2004-05-30 11:53:10 +02:00
Tobias Schlüter
08fb03fdf3
re PR libfortran/15234 (libgfortran doesn't compile on Tru64 UNIX V4.0F)
...
PR fortran/15234
* intrinsics/associated.c: Remove enum.
(associated): Replace TRUE/FALSE by 1/0.
From-SVN: r82322
2004-05-27 15:05:23 +02:00
Steven G. Kargl
322c24252e
* random.c (random_seed): Use correct variable.
...
From-SVN: r82167
2004-05-23 16:18:22 +00:00
Steven G. Kargl
21fdfcc12c
check.c (gfc_check_system_clock): New function.
...
* check.c (gfc_check_system_clock): New function.
* intrinsic.c (add_sym_3s): New function.
(add_subroutines): Use it.
* intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
Add prototypes.
* iresolve.c (gfc_resolve_system_clock): New function.
libgfortran/
* intrinsics/system_clock: New file.
* Makefile.am: Add intrinsics/system_clock.c.
* Makefile.in: Regenerate.
From-SVN: r82131
2004-05-22 12:47:42 +00:00
Roger Sayle
11670eebf3
io.c (check_format): As a GNU extension...
...
* io.c (check_format): As a GNU extension, allow the comma after a
string literal to be optional in a format. Use gfc_notify_std to
issue an error/warning as appropriate.
* io/format.c (parse_format_list): Allow the comma after a string
literal to be optional.
From-SVN: r82109
2004-05-21 21:37:25 +00:00
Feng Wang
59fa6e39c6
Credit Feng Wang <fengwang@nudt.edu.cn> in ChangeLog.
...
From-SVN: r82023
2004-05-19 10:41:38 +00:00
Feng Wang
5b200ac2c7
f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
...
* f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
Create decls for __builtin_pow{,f}.
* gfortran.h (PREFIX_LEN): Define.
* trans-decl.c (gfor_fndecl_math_powi): Add.
(gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
(gfc_build_intrinsic_function_decls): Create decls for powi.
* trans-expr.c (powi_table): Add.
(gfc_conv_integer_power): Remove.
(gfc_conv_powi): New function.
(gfc_conv_cst_int_power): New function.
(gfc_conv_power_op): Use new powi routines.
* trans.h (struct gfc_powdecl_list): Add.
(gfor_fndecl_math_powi): Add.
(gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
testsuite/
* gfortran.fortran-torture/execute/power.f90: Test constant integers.
libgfortran/
* Makefile.am (i_pow_c): Set it. Add build rule.
(gfor_built_src): Use it.
(m4_files): add m4/pow.m4.
* Makefile.in: Regenerate.
* m4/pow.m4: New file.
* generated/pow_*.c: Regenerate.
From-SVN: r82014
2004-05-19 00:34:59 +00:00
Paul Brook
c9e66eda1a
Makefile.am: Remove references to types.m4.
...
* Makefile.am: Remove references to types.m4.
* m4/iparm.m4: Merge with types.m4.
* m4/types.m4: Remove.
* 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/in_pack.m4, m4/in_unpack.m4, m4/iparm.m4, m4/matmul.m4,
m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4,
m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/reshape.m4,
m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/transpose.m4):
Update to use new iparm.m4.
* generated/*.c: Regenerate.
From-SVN: r82003
2004-05-18 19:03:26 +00:00
Tobias Schlüter
81f4be3ce1
re PR libfortran/15235 (libgfortran doesn't build on Solaris 10)
...
PR fortran/15235
* gfortran.h (offset_t): Rename to ...
(gfc_offset): ... this.
* io/backspace.c (formatted_backspace, unformatted_backspace),
io/io.h (stream, gfc_unit, global_t, file_length, file_position),
transfer.c (us_read, us_write, next_record_r, next_record_w),
io/unit.c (init_units), unix.c (unix_stream, fd_alloc,
fd_alloc_r_at, fd_alloc_w_at, fd_seek, mmap_alloc,
mmap_alloc_r_at, mmap_alloc_w_at, mmap_seek, mem_alloc_r_at,
mem_alloc_w_at, mem_seek, file_length, file_position): Replace all
occurences of offset_t by gfc_offset.
From-SVN: r81994
2004-05-18 18:06:09 +02:00
Kaz Kojima
c779c42fc3
re PR bootstrap/15120 ([3.3 only] [libtool bug] hidden symbol `__sdivsi3_i4' is referenced by DSO)
...
PR bootstrap/15120
* libtool.m4 (lt_cv_deplibs_check_method): Use pass_all on sh*.
* */configure: Rebuilt.
From-SVN: r81980
2004-05-18 10:11:38 +00:00
Paul Brook
6d3e9d8454
* io/format.c (write_real): Don't include padding in format.
...
From-SVN: r81922
2004-05-16 20:17:04 +00:00
Paul Brook
28963c8f26
* io/format.c (format_lex): Make c an int.
...
From-SVN: r81920
2004-05-16 18:21:42 +00:00
Janne Blomqvist
d464f8e99e
write.c (write_logical): Don't print extra blank.
...
* io/write.c (write_logical): Don't print extra blank.
(write_integer): Base field width on kind.
(list_formatted_write): Output initial blank.
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r81914
2004-05-16 14:07:58 +00:00
Janne Blomqvist
000aa32a49
io.h (flush): Add prototype.
...
* io/io.h (flush): Add prototype.
* io/transfer.c (finalize_transfer): Flush partial records.
* io/unix.c (flush): New function.
From-SVN: r81913
2004-05-16 13:27:48 +00:00
Tobias Schlüter
909087e0cf
re PR libfortran/15234 (libgfortran doesn't compile on Tru64 UNIX V4.0F)
...
PR fortran/15234
* io/io.h (unit_t): Rename to ...
(gfc_unit) ... this.
(unit_root, current_unit, find_file, find_unit, get_unit): Now
of type gfc_unit.
(delete_file, insert_unit, close_unit): Argument now of type
gfc_unit.
* backspace.c (st_backspace), close.c (st_close), endfile.c
(st_endfile), inquire.c (inquire_via_unit, st_inquire), open.c
(test_endfile, edit_modes, new_unit, already_open, st_open),
rewind.c (st_rewind), transfer.c (current_unit), unit.c
(internal_unit, unit_cache, rotate_left, rotate_right, insert,
insert_unit, delete_root, delete_treap, delete_unit, find_unit,
get_unit, init_units, close_unit), unix.c (find_file0,
find_file, delete_file): Replace all occurences of unit_t by
gfc_unit.
From-SVN: r81903
2004-05-15 22:44:38 +02:00
Bud Davis
94161cec95
re PR libfortran/15311 (Incorrect handling of A edit descriptor)
...
PR fortran/15311
* io/write.c (write_a): right justify A edit output.
libgfortran/
* gfortran.fortran-torture/execute/write_a_1.f90: New test.
From-SVN: r81895
2004-05-15 18:35:39 +00:00
Bud Davis
abdef81151
re PR libfortran/15149 (problem computing Pi)
...
PR fortran/15149
* gfortran.fortran-torture/execute/random_init.f90: New test.
* libgfortan.h,intrinsics/random.c: Made random_seed visible.
* runtime/main.c(init): Call random_seed as part of MAIN init.
From-SVN: r81836
2004-05-14 12:21:22 +00:00
Tobias Schlüter
187f073476
format.c: (parse_format_list): No comma is required after P descriptor.
...
* io/format.c: (parse_format_list): No comma is required after
P descriptor.
From-SVN: r81819
2004-05-13 23:36:16 +00:00
Andrew Pinski
0e7b565cbf
Fix format in (and bug number):
...
2004-05-13 Bud Davis <bdavis9659@comcast.net>
PR fortran/15204
* io/intrinsic/string_intrinsics.c (adjustr): rework logic.
From-SVN: r81810
2004-05-13 15:41:37 -07:00
Bud Davis
92fbb7592b
re PR libfortran/15204 (ADJUSTR intrinsic accesses corrupted pointer)
...
PR fortran/15294
* gfortran.fortran-torture/execute/adjustr.f90: New file.
* io/intrinsic/string_intrinsics.c(adjustr): rework logic.
From-SVN: r81771
2004-05-13 10:11:02 +00:00
Diego Novillo
6de9cd9a88
Merge tree-ssa-20020619-branch into mainline.
...
From-SVN: r81764
2004-05-13 02:41:07 -04:00