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
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
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
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
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
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
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
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
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
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