Commit 5ff904cd by Jeff Law

Initial revision

From-SVN: r14772
parent 9f31cf0d
This file lists known bugs in the GNU Fortran compiler. Copyright (C)
1995, 1996 Free Software Foundation, Inc. You may copy, distribute,
and modify it freely as long as you preserve this copyright notice and
permission notice.
Bugs in GNU Fortran
*******************
This section identifies bugs that `g77' *users* might run into.
This includes bugs that are actually in the `gcc' back end (GBE) or in
`libf2c', because those sets of code are at least somewhat under the
control of (and necessarily intertwined with) `g77', so it isn't worth
separating them out.
For information on bugs that might afflict people who configure,
port, build, and install `g77', *Note Problems Installing::.
* Work is needed on the `SIGNAL()' intrinsic to ensure that pointers
and integers are properly handled on all targets, including 64-bit
machines.
* When using `-fugly-comma', `g77' assumes an extra `%VAL(0)'
argument is to be passed to intrinsics taking no arguments, such
as `IARGC()', which in turn reject such a call. Although this has
been worked around for 0.5.18 due to changes in the handling of
intrinsics, `g77' needs to do the ugly-argument-appending trick
only for external-function invocation, as this would probably be
more consistent with compilers that default to using that trick.
* Something about `g77''s straightforward handling of label
references and definitions sometimes prevents the GBE from
unrolling loops. Until this is solved, try inserting or removing
`CONTINUE' statements as the terminal statement, using the `END DO'
form instead, and so on. (Probably improved, but not wholly
fixed, in 0.5.21.)
* The `g77' command itself should more faithfully process options
the way the `gcc' command does. For example, `gcc' accepts
abbreviated forms of long options, `g77' generally doesn't.
* Some confusion in diagnostics concerning failing `INCLUDE'
statements from within `INCLUDE''d or `#include''d files.
* `g77' assumes that `INTEGER(KIND=1)' constants range from `-2**31'
to `2**31-1' (the range for two's-complement 32-bit values),
instead of determining their range from the actual range of the
type for the configuration (and, someday, for the constant).
Further, it generally doesn't implement the handling of constants
very well in that it makes assumptions about the configuration
that it no longer makes regarding variables (types).
Included with this item is the fact that `g77' doesn't recognize
that, on IEEE-754/854-compliant systems, `0./0.' should produce a
NaN and no warning instead of the value `0.' and a warning. This
is to be fixed in version 0.6, when `g77' will use the `gcc' back
end's constant-handling mechanisms to replace its own.
* `g77' uses way too much memory and CPU time to process large
aggregate areas having any initialized elements.
For example, `REAL A(1000000)' followed by `DATA A(1)/1/' takes up
way too much time and space, including the size of the generated
assembler file. This is to be mitigated somewhat in version 0.6.
Version 0.5.18 improves cases like this--specifically, cases of
*sparse* initialization that leave large, contiguous areas
uninitialized--significantly. However, even with the
improvements, these cases still require too much memory and CPU
time.
(Version 0.5.18 also improves cases where the initial values are
zero to a much greater degree, so if the above example ends with
`DATA A(1)/0/', the compile-time performance will be about as good
as it will ever get, aside from unrelated improvements to the
compiler.)
Note that `g77' does display a warning message to notify the user
before the compiler appears to hang. *Note Initialization of
Large Aggregate Areas: Large Initialization, for information on
how to change the point at which `g77' decides to issue this
warning.
* `g77' doesn't emit variable and array members of common blocks for
use with a debugger (the `-g' command-line option). The code is
present to do this, but doesn't work with at least one debug
format--perhaps it works with others. And it turns out there's a
similar bug for local equivalence areas, so that has been disabled
as well.
As of Version 0.5.19, a temporary kludge solution is provided
whereby some rudimentary information on a member is written as a
string that is the member's value as a character string.
*Note Options for Code Generation Conventions: Code Gen Options,
for information on the `-fdebug-kludge' option.
* When debugging, after starting up the debugger but before being
able to see the source code for the main program unit, the user
must currently set a breakpoint at `MAIN__' (or `MAIN___' or
`MAIN_' if `MAIN__' doesn't exist) and run the program until it
hits the breakpoint. At that point, the main program unit is
activated and about to execute its first executable statement, but
that's the state in which the debugger should start up, as is the
case for languages like C.
* Debugging `g77'-compiled code using debuggers other than `gdb' is
likely not to work.
Getting `g77' and `gdb' to work together is a known
problem--getting `g77' to work properly with other debuggers, for
which source code often is unavailable to `g77' developers, seems
like a much larger, unknown problem, and is a lower priority than
making `g77' and `gdb' work together properly.
On the other hand, information about problems other debuggers have
with `g77' output might make it easier to properly fix `g77', and
perhaps even improve `gdb', so it is definitely welcome. Such
information might even lead to all relevant products working
together properly sooner.
* `g77' currently inserts needless padding for things like `COMMON
A,IPAD' where `A' is `CHARACTER*1' and `IPAD' is `INTEGER(KIND=1)'
on machines like x86, because the back end insists that `IPAD' be
aligned to a 4-byte boundary, but the processor has no such
requirement (though it's good for performance).
It is possible that this is not a real bug, and could be considered
a performance feature, but it might be important to provide the
ability to Fortran code to specify minimum padding for aggregate
areas such as common blocks--and, certainly, there is the
potential, with the current setup, for interface differences in
the way such areas are laid out between `g77' and other compilers.
* Some crashes occur when compiling under Solaris on x86 machines.
Nothing has been heard about any such problems for some time, so
this is considering a closed item as of 0.5.20. Please submit any
bug reports pertinent to `g77''s support for Solaris/x86 systems.
* RS/6000 support is not complete as of the gcc 2.6.3 back end. The
2.7.0 back end appears to fix this problem, or at least mitigate
it significantly, but there is at least one known problem that is
likely to be a code-generation bug in `gcc-2.7.0' plus
`g77-0.5.16'. This problem shows up only when compiling the
Fortran program with `-O'.
Nothing has been heard about any RS/6000 problems for some time,
so this is considering a closed item as of 0.5.20. Please submit
any bug reports pertinent to `g77''s support for RS/6000 systems.
* SGI support is known to be a bit buggy. The known problem shows
up only when compiling the Fortran program with `-O'.
It is possible these problems have all been fixed in 0.5.20 by
emulating complex arithmetic in the front end. Please submit any
bug reports pertinent to `g77''s support for SGI systems.
* `g77' doesn't work perfectly on 64-bit configurations such as the
Alpha. This problem is expected to be largely resolved as of
version 0.5.20, and further addressed by 0.5.21. Version 0.6
should solve most or all related problems (such as 64-bit machines
other than Digital Semiconductor ("DEC") Alphas).
One known bug that causes a compile-time crash occurs when
compiling code such as the following with optimization:
SUBROUTINE CRASH (TEMP)
INTEGER*2 HALF(2)
REAL TEMP
HALF(1) = NINT (TEMP)
END
It is expected that a future version of `g77' will have a fix for
this problem, almost certainly by the time `g77' supports the
forthcoming version 2.8.0 of `gcc'.
* Maintainers of gcc report that the back end definitely has "broken"
support for `COMPLEX' types. Based on their input, it seems many
of the problems affect only the more-general facilities for gcc's
`__complex__' type, such as `__complex__ int' (where the real and
imaginary parts are integers) that GNU Fortran does not use.
Version 0.5.20 of `g77' works around this problem by not using the
back end's support for `COMPLEX'. The new option
`-fno-emulate-complex' avoids the work-around, reverting to using
the same "broken" mechanism as that used by versions of `g77'
prior to 0.5.20.
* There seem to be some problems with passing constants, and perhaps
general expressions (other than simple variables/arrays), to
procedures when compiling on some systems (such as i386) with
`-fPIC', as in when compiling for ELF targets. The symptom is
that the assembler complains about invalid opcodes. More
investigation is needed, but the problem is almost certainly in
the gcc back end, and it apparently occurs only when compiling
sufficiently complicated functions *without* the `-O' option.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1995-02-15
This directory is the f/ subdirectory, which is designed to
be a subdirectory in a gcc development tree, i.e. named gcc/f/.
Please see gcc/README.g77 for information on the contents of this
directory.
/* assert.j -- Wrapper for GCC's assert.h
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef MAKING_DEPENDENCIES
#ifndef _J_f_assert
#define _J_f_assert
#include "assert.h"
#endif
#endif
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
/* bad.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
bad.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_bad
#define _H_f_bad
/* Simple definitions and enumerations. */
typedef enum
{
#define FFEBAD_MSGS1(KWD,SEV,MSG) KWD,
#define FFEBAD_MSGS2(KWD,SEV,LMSG,SMSG) KWD,
#include "bad.def"
#undef FFEBAD_MSGS1
#undef FFEBAD_MSGS2
FFEBAD
} ffebad;
typedef enum
{
/* Order important; must be increasing severity. */
FFEBAD_severityINFORMATIONAL, /* User notice. */
FFEBAD_severityTRIVIAL, /* Internal notice. */
FFEBAD_severityWARNING, /* User warning. */
FFEBAD_severityPECULIAR, /* Internal warning. */
FFEBAD_severityPEDANTIC, /* Pedantic, could be warning or error. */
FFEBAD_severityFATAL, /* User error. */
FFEBAD_severityWEIRD, /* Internal error. */
FFEBAD_severitySEVERE, /* User error, cannot continue. */
FFEBAD_severityDISASTER, /* Internal error, cannot continue. */
FFEBAD_severity
} ffebadSeverity;
/* Typedefs. */
typedef unsigned char ffebadIndex;
/* Include files needed by this one. */
#include "where.h"
/* Structure definitions. */
/* Global objects accessed by users of this module. */
extern bool ffebad_is_inhibited_;
/* Declare functions with prototypes. */
void ffebad_finish (void);
void ffebad_here (ffebadIndex i, ffewhereLine wl, ffewhereColumn wc);
void ffebad_init_0 (void);
bool ffebad_is_fatal (ffebad errnum);
ffebadSeverity ffebad_severity (ffebad errnum);
bool ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
char *message);
void ffebad_string (char *string);
/* Define macros. */
#define ffebad_inhibit() (ffebad_is_inhibited_)
#define ffebad_init_1()
#define ffebad_init_2()
#define ffebad_init_3()
#define ffebad_init_4()
#define ffebad_set_inhibit(f) (ffebad_is_inhibited_ = (f))
#define ffebad_start(e) ffebad_start_ (FALSE, (e), FFEBAD_severity, NULL)
#define ffebad_start_lex(e) ffebad_start_ (TRUE, (e), FFEBAD_severity, NULL)
#define ffebad_start_msg(m,s) ffebad_start_ (FALSE, FFEBAD, (s), (m))
#define ffebad_start_msg_lex(m,s) ffebad_start_ (TRUE, FFEBAD, (s), (m))
#define ffebad_terminate_0()
#define ffebad_terminate_1()
#define ffebad_terminate_2()
#define ffebad_terminate_3()
#define ffebad_terminate_4()
/* End of #include file. */
#endif
/* bit.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Related Modules:
None
Description:
Tracks arrays of booleans in useful ways.
Modifications:
*/
/* Include files. */
#include "proj.h"
#include "glimits.j"
#include "bit.h"
#include "malloc.h"
/* Externals defined here. */
/* Simple definitions and enumerations. */
/* Internal typedefs. */
/* Private include files. */
/* Internal structure definitions. */
/* Static objects accessed by functions in this module. */
/* Static functions (internal). */
/* Internal macros. */
/* ffebit_count -- Count # of bits set a particular way
ffebit b; // the ffebit object
ffebitCount offset; // 0..size-1
bool value; // FALSE (0), TRUE (1)
ffebitCount range; // # bits to test
ffebitCount number; // # bits equal to value
ffebit_count(b,offset,value,range,&number);
Sets <number> to # bits at <offset> through <offset + range - 1> set to
<value>. If <range> is 0, <number> is set to 0. */
void
ffebit_count (ffebit b, ffebitCount offset, bool value, ffebitCount range,
ffebitCount *number)
{
ffebitCount element;
ffebitCount bitno;
assert (offset + range <= b->size);
for (*number = 0; range != 0; --range, ++offset)
{
element = offset / CHAR_BIT;
bitno = offset % CHAR_BIT;
if (value
== ((b->bits[element] & ((unsigned char) 1 << bitno)) == 0 ? FALSE : TRUE))
++ * number;
}
}
/* ffebit_new -- Create a new ffebit object
ffebit b;
ffebit_kill(b);
Destroys an ffebit object obtained via ffebit_new. */
void
ffebit_kill (ffebit b)
{
malloc_kill_ks (b->pool, b,
offsetof (struct _ffebit_, bits)
+ (b->size + CHAR_BIT - 1) / CHAR_BIT);
}
/* ffebit_new -- Create a new ffebit object
ffebit b;
mallocPool pool;
ffebitCount size;
b = ffebit_new(pool,size);
Allocates an ffebit object that holds the values of <size> bits in pool
<pool>. */
ffebit
ffebit_new (mallocPool pool, ffebitCount size)
{
ffebit b;
b = malloc_new_zks (pool, "ffebit",
offsetof (struct _ffebit_, bits)
+ (size + CHAR_BIT - 1) / CHAR_BIT,
0);
b->pool = pool;
b->size = size;
return b;
}
/* ffebit_set -- Set value of # of bits
ffebit b; // the ffebit object
ffebitCount offset; // 0..size-1
bool value; // FALSE (0), TRUE (1)
ffebitCount length; // # bits to set starting at offset (usually 1)
ffebit_set(b,offset,value,length);
Sets bit #s <offset> through <offset + length - 1> to <value>. */
void
ffebit_set (ffebit b, ffebitCount offset, bool value, ffebitCount length)
{
ffebitCount i;
ffebitCount element;
ffebitCount bitno;
assert (offset + length <= b->size);
for (i = 0; i < length; ++i, ++offset)
{
element = offset / CHAR_BIT;
bitno = offset % CHAR_BIT;
b->bits[element] = (((unsigned char) (value ? 1 : 0)) << bitno)
| (b->bits[element] & ~((unsigned char) 1 << bitno));
}
}
/* ffebit_test -- Test value of # of bits
ffebit b; // the ffebit object
ffebitCount offset; // 0..size-1
bool value; // FALSE (0), TRUE (1)
ffebitCount length; // # bits with same value
ffebit_test(b,offset,&value,&length);
Returns value of bits at <offset> through <offset + length - 1> in
<value>. If <offset> is already at the end of the bit array (if
offset == ffebit_size(b)), <length> is set to 0 and <value> is
undefined. */
void
ffebit_test (ffebit b, ffebitCount offset, bool *value, ffebitCount *length)
{
ffebitCount i;
ffebitCount element;
ffebitCount bitno;
if (offset >= b->size)
{
assert (offset == b->size);
*length = 0;
return;
}
element = offset / CHAR_BIT;
bitno = offset % CHAR_BIT;
*value = (b->bits[element] & ((unsigned char) 1 << bitno)) == 0 ? FALSE : TRUE;
*length = 1;
for (i = b->size - offset - 1, ++offset; i != 0; --i, ++offset, ++*length)
{
element = offset / CHAR_BIT;
bitno = offset % CHAR_BIT;
if (*value
!= ((b->bits[element] & ((unsigned char) 1 << bitno)) == 0 ? FALSE : TRUE))
break;
}
}
/* bit.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
bit.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_bit
#define _H_f_bit
/* Simple definitions and enumerations. */
/* Typedefs. */
typedef struct _ffebit_ *ffebit;
typedef unsigned long ffebitCount;
#define ffebitCount_f "l"
/* Include files needed by this one. */
#include "malloc.h"
/* Structure definitions. */
struct _ffebit_
{
mallocPool pool;
ffebitCount size;
unsigned char bits[1];
};
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
void ffebit_count (ffebit b, ffebitCount offset, bool value, ffebitCount range,
ffebitCount *number);
void ffebit_kill (ffebit b);
ffebit ffebit_new (mallocPool pool, ffebitCount size);
void ffebit_set (ffebit b, ffebitCount offset, bool value, ffebitCount length);
void ffebit_test (ffebit b, ffebitCount offset, bool *value, ffebitCount *length);
/* Define macros. */
#define ffebit_init_0()
#define ffebit_init_1()
#define ffebit_init_2()
#define ffebit_init_3()
#define ffebit_init_4()
#define ffebit_pool(b) ((b)->pool)
#define ffebit_size(b) ((b)->size)
#define ffebit_terminate_0()
#define ffebit_terminate_1()
#define ffebit_terminate_2()
#define ffebit_terminate_3()
#define ffebit_terminate_4()
/* End of #include file. */
#endif
/* bld-op.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
bad.c
Modifications:
*/
FFEBLD_OP (FFEBLD_opANY, "ANY", 0)
FFEBLD_OP (FFEBLD_opSTAR, "STAR", 0) /* For adjustable arrays, alternate return dummies, etc. */
FFEBLD_OP (FFEBLD_opCONTER, "CONTER", 0)
FFEBLD_OP (FFEBLD_opARRTER, "ARRTER", 0) /* Array of constants (DATA...). */
FFEBLD_OP (FFEBLD_opACCTER, "ACCTER", 0) /* Accreting ARRTER. */
FFEBLD_OP (FFEBLD_opSYMTER, "SYMTER", 0)
FFEBLD_OP (FFEBLD_opITEM, "ITEM", 0)
FFEBLD_OP (FFEBLD_opUPLUS, "UPLUS", 1)
FFEBLD_OP (FFEBLD_opUMINUS, "UMINUS", 1)
FFEBLD_OP (FFEBLD_opADD, "ADD", 2)
FFEBLD_OP (FFEBLD_opSUBTRACT, "SUBTRACT", 2)
FFEBLD_OP (FFEBLD_opMULTIPLY, "MULTIPLY", 2)
FFEBLD_OP (FFEBLD_opDIVIDE, "DIVIDE", 2)
FFEBLD_OP (FFEBLD_opPOWER, "POWER", 2)
FFEBLD_OP (FFEBLD_opCONCATENATE, "CONCATENATE", 2)
FFEBLD_OP (FFEBLD_opNOT, "NOT", 1)
FFEBLD_OP (FFEBLD_opLT, "LT", 2)
FFEBLD_OP (FFEBLD_opLE, "LE", 2)
FFEBLD_OP (FFEBLD_opEQ, "EQ", 2)
FFEBLD_OP (FFEBLD_opNE, "NE", 2)
FFEBLD_OP (FFEBLD_opGT, "GT", 2)
FFEBLD_OP (FFEBLD_opGE, "GE", 2)
FFEBLD_OP (FFEBLD_opAND, "AND", 2)
FFEBLD_OP (FFEBLD_opOR, "OR", 2)
FFEBLD_OP (FFEBLD_opXOR, "XOR", 2)
FFEBLD_OP (FFEBLD_opEQV, "EQV", 2)
FFEBLD_OP (FFEBLD_opNEQV, "NEQV", 2)
FFEBLD_OP (FFEBLD_opPAREN, "PAREN", 1)
FFEBLD_OP (FFEBLD_opPERCENT_LOC, "%LOC", 1)
FFEBLD_OP (FFEBLD_opPERCENT_VAL, "%VAL", 1)
FFEBLD_OP (FFEBLD_opPERCENT_REF, "%REF", 1)
FFEBLD_OP (FFEBLD_opPERCENT_DESCR, "%DESCR", 1)
FFEBLD_OP (FFEBLD_opCONVERT, "CONVERT", 1)
FFEBLD_OP (FFEBLD_opREPEAT, "REPEAT", 2)
FFEBLD_OP (FFEBLD_opBOUNDS, "BOUNDS", 2) /* For low:high in dimension lists. */
FFEBLD_OP (FFEBLD_opFUNCREF, "FUNCREF", 2)
FFEBLD_OP (FFEBLD_opSUBRREF, "SUBRREF", 2)
FFEBLD_OP (FFEBLD_opARRAYREF, "ARRAYREF", 2)
FFEBLD_OP (FFEBLD_opSUBSTR, "SUBSTR", 2)
FFEBLD_OP (FFEBLD_opLABTER, "LABTER", 0)
FFEBLD_OP (FFEBLD_opLABTOK, "LABTOK", 0) /* Like LABTER but contains ffelexToken instead. */
FFEBLD_OP (FFEBLD_opIMPDO, "IMPDO", 2)
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename BUGS
@set BUGSONLY
@c %**end of header
@c The immediately following lines apply to the BUGS file
@c which is generated using this file.
This file lists known bugs in the GNU Fortran compiler.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
You may copy, distribute, and modify it freely as long as you preserve
this copyright notice and permission notice.
@node Top,,, (dir)
@chapter Bugs in GNU Fortran
@include bugs.texi
@bye
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
# Top level configure fragment for GNU FORTRAN.
# Copyright (C) 1995-1997 Free Software Foundation, Inc.
#This file is part of GNU Fortran.
#GNU Fortran is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
#GNU Fortran is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GNU Fortran; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#02111-1307, USA.
# Configure looks for the existence of this file to auto-config each language.
# We define several parameters used by configure:
#
# language - name of language as it would appear in $(LANGUAGES)
# compilers - value to add to $(COMPILERS)
# stagestuff - files to add to $(STAGESTUFF)
# diff_excludes - files to ignore when building diffs between two versions.
if grep DECL_STATIC_CONSTRUCTOR $srcdir/tree.h >/dev/null; then
if grep flag_move_all_movables $srcdir/toplev.c >/dev/null; then true
else
echo "You haven't applied the patches to the GCC 2.7.x distribution in"
echo "$srcdir as described in g77/README.g77 and gcc/f/gbe/README."
echo ""
exit 1
fi
else
if grep put_pending_sizes $srcdir/stor-layout.c >/dev/null; then true
else
echo "You haven't applied the patches to the GCC 2.6.x distribution in"
echo "$srcdir as described in g77/README.g77 and gcc/f/gbe/README."
echo ""
exit 1
fi
fi
language="f77"
compilers="f771\$(exeext)"
case "$arguments" in
# *--enable-f2c* | *-enable-f2c*)
# echo "f77: enabling f2c."
# stagestuff="g77 g77-cross f771 libf2c.a f2c fc" ;;
# stagestuff="g77 g77-cross f771 libf2c.a f2c" ;;
*)
stagestuff="g77\$(exeext) g77-cross\$(exeext) f771\$(exeext) libf2c.a" ;;
esac
diff_excludes="-x \"f/g77.info*\""
# Create the runtime library directory tree if necessary.
test -d f || mkdir f
test -d f/runtime || mkdir f/runtime
test -d f/runtime/libF77 || mkdir f/runtime/libF77
test -d f/runtime/libI77 || mkdir f/runtime/libI77
test -d f/runtime/libU77 || mkdir f/runtime/libU77
# Need to make top-level stageN directory trees, else if needed
# later by gcc/Makefile, it'll make only the first levels and
# the language subdirectory levels, not the runtime stuff.
for stageN in stage1 stage2 stage3 stage4
do
test -d $stageN || mkdir $stageN
test -d $stageN/f || mkdir $stageN/f
test -d $stageN/f/runtime || mkdir $stageN/f/runtime
test -d $stageN/f/runtime/libF77 || mkdir $stageN/f/runtime/libF77
test -d $stageN/f/runtime/libI77 || mkdir $stageN/f/runtime/libI77
test -d $stageN/f/runtime/libU77 || mkdir $stageN/f/runtime/libU77
done
# Make links into top-level stageN from target trees.
for stageN in stage1 stage2 stage3 stage4 include
do
$remove -f f/$stageN f/runtime/$stageN f/runtime/libF77/$stageN \
f/runtime/libI77/$stageN f/runtime/libU77/$stageN
(cd f; $symbolic_link ../$stageN . 2>/dev/null)
(cd f/runtime; $symbolic_link ../$stageN . 2>/dev/null)
(cd f/runtime/libF77; $symbolic_link ../$stageN . 2>/dev/null)
(cd f/runtime/libI77; $symbolic_link ../$stageN . 2>/dev/null)
(cd f/runtime/libU77; $symbolic_link ../$stageN . 2>/dev/null)
done
case "$srcdir" in
.) ;;
*) echo
echo "Building f77 outside the source directory is likely to not work"
echo "unless you are using GNU make or a compatible VPATH mechanism."
echo ;;
esac
/* config.j -- Wrapper for GCC's config.h
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef MAKING_DEPENDENCIES
#ifndef _J_f_config
#define _J_f_config
#include "config.h"
#endif
#endif
/* convert.j -- Wrapper for GCC's convert.h
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef MAKING_DEPENDENCIES
#ifndef _J_f_convert
#define _J_f_convert
#include "tree.j"
#include "convert.h"
#endif
#endif
This diff is collapsed. Click to expand it.
/* data.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
data.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_data
#define _H_f_data
/* Simple definitions and enumerations. */
/* Typedefs. */
/* Include files needed by this one. */
#include "bld.h"
#include "lex.h"
#include "storag.h"
/* Structure definitions. */
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
void ffedata_begin (ffebld list);
bool ffedata_end (bool report_errors, ffelexToken t);
void ffedata_gather (ffestorag st);
bool ffedata_value (ffetargetIntegerDefault rpt, ffebld value,
ffelexToken value_token);
/* Define macros. */
#define ffedata_init_0()
#define ffedata_init_1()
#define ffedata_init_2()
#define ffedata_init_3()
#define ffedata_init_4()
#define ffedata_terminate_0()
#define ffedata_terminate_1()
#define ffedata_terminate_2()
#define ffedata_terminate_3()
#define ffedata_terminate_4()
/* End of #include file. */
#endif
This diff is collapsed. Click to expand it.
/* equiv.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
equiv.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_equiv
#define _H_f_equiv
/* Simple definitions and enumerations. */
/* Typedefs. */
typedef struct _ffeequiv_ *ffeequiv;
/* Include files needed by this one. */
#include "bld.h"
#include "lex.h"
#include "storag.h"
#include "symbol.h"
/* Structure definitions. */
struct _ffeequiv_
{
ffeequiv next;
ffeequiv previous;
ffesymbol common; /* Common area for this equiv, if any. */
ffebld list; /* List of lists of equiv exprs. */
bool is_save; /* Any SAVEd members? */
bool is_init; /* Any initialized members? */
};
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
void ffeequiv_add (ffeequiv eq, ffebld list, ffelexToken t);
void ffeequiv_dump (ffeequiv eq);
void ffeequiv_exec_transition (void);
void ffeequiv_init_2 (void);
void ffeequiv_kill (ffeequiv victim);
bool ffeequiv_layout_cblock (ffestorag st);
ffeequiv ffeequiv_merge (ffeequiv eq1, ffeequiv eq2, ffelexToken t);
ffeequiv ffeequiv_new (void);
ffesymbol ffeequiv_symbol (ffebld expr);
void ffeequiv_update_init (ffeequiv eq);
void ffeequiv_update_save (ffeequiv eq);
/* Define macros. */
#define ffeequiv_common(e) ((e)->common)
#define ffeequiv_init_0()
#define ffeequiv_init_1()
#define ffeequiv_init_3()
#define ffeequiv_init_4()
#define ffeequiv_is_init(e) ((e)->is_init)
#define ffeequiv_is_save(e) ((e)->is_save)
#define ffeequiv_list(e) ((e)->list)
#define ffeequiv_next(e) ((e)->next)
#define ffeequiv_previous(e) ((e)->previous)
#define ffeequiv_set_common(e,c) ((e)->common = (c))
#define ffeequiv_set_init(e,i) ((e)->init = (i))
#define ffeequiv_set_is_init(e,in) ((e)->is_init = (in))
#define ffeequiv_set_is_save(e,sa) ((e)->is_save = (sa))
#define ffeequiv_set_list(e,l) ((e)->list = (l))
#define ffeequiv_terminate_0()
#define ffeequiv_terminate_1()
#define ffeequiv_terminate_2()
#define ffeequiv_terminate_3()
#define ffeequiv_terminate_4()
/* End of #include file. */
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
/* expr.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
expr.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_expr
#define _H_f_expr
/* Simple definitions and enumerations. */
typedef enum
{
FFEEXPR_contextLET,
FFEEXPR_contextASSIGN,
FFEEXPR_contextIOLIST,
FFEEXPR_contextPARAMETER,
FFEEXPR_contextSUBROUTINEREF,
FFEEXPR_contextDATA,
FFEEXPR_contextIF,
FFEEXPR_contextARITHIF,
FFEEXPR_contextDO,
FFEEXPR_contextDOWHILE,
FFEEXPR_contextFORMAT,
FFEEXPR_contextAGOTO,
FFEEXPR_contextCGOTO,
FFEEXPR_contextCHARACTERSIZE,
FFEEXPR_contextEQUIVALENCE,
FFEEXPR_contextSTOP,
FFEEXPR_contextRETURN,
FFEEXPR_contextSFUNCDEF,
FFEEXPR_contextINCLUDE,
FFEEXPR_contextWHERE,
FFEEXPR_contextSELECTCASE,
FFEEXPR_contextCASE,
FFEEXPR_contextDIMLIST,
FFEEXPR_contextDIMLISTCOMMON, /* Dim list in COMMON stmt. */
FFEEXPR_contextFILEASSOC, /* ASSOCIATEVARIABLE=. */
FFEEXPR_contextFILEINT, /* IOSTAT=. */
FFEEXPR_contextFILEDFINT, /* NEXTREC=. */
FFEEXPR_contextFILELOG, /* NAMED=. */
FFEEXPR_contextFILENUM, /* Numerical expression. */
FFEEXPR_contextFILECHAR, /* Character expression. */
FFEEXPR_contextFILENUMCHAR, /* READ KEYxyz=. */
FFEEXPR_contextFILEDFCHAR, /* Default kind character expression. */
FFEEXPR_contextFILEKEY, /* OPEN KEY=. */
FFEEXPR_contextFILEEXTFUNC, /* USEROPEN=. */
FFEEXPR_contextFILEUNIT, /* READ/WRITE UNIT=. */
FFEEXPR_contextFILEUNIT_DF, /* DEFINE FILE unit (no "(" after it). */
FFEEXPR_contextFILEFORMATNML, /* [FMT=] or [NML=]. */
FFEEXPR_contextFILEFORMAT, /* FMT=. */
FFEEXPR_contextFILENAMELIST,/* NML=. */
FFEEXPR_contextFILENUMAMBIG,/* BACKSPACE, ENDFILE, REWIND, UNLOCK...
where at e.g. BACKSPACE(, if COMMA seen
before ), it is ok. */
FFEEXPR_contextFILEUNITAMBIG, /* READ(, if COMMA seen before ), ok. */
FFEEXPR_contextFILEVXTCODE, /* ENCODE/DECODE third arg (scalar/array). */
FFEEXPR_contextALLOCATE, /* ALLOCATE objects (weird). */
FFEEXPR_contextDEALLOCATE, /* DEALLOCATE objects (weird). */
FFEEXPR_contextHEAPSTAT, /* ALLOCATE/DEALLOCATE STAT= variable. */
FFEEXPR_contextKINDTYPE, /* KIND=. */
FFEEXPR_contextINITVAL, /* R426 =initialization-expr. */
FFEEXPR_contextNULLIFY, /* Pointer names only (F90) or pointers. */
FFEEXPR_contextIOLISTDF, /* IOLIST w/internal file (V112 9-14 30,31). */
FFEEXPR_contextINDEX_, /* Element dimension or substring value. */
FFEEXPR_contextEQVINDEX_, /* EQUIVALENCE element dimension. */
FFEEXPR_contextDATAIMPDOINDEX_, /* INDEX in DATAIMPDO context. */
FFEEXPR_contextIMPDOITEM_,
FFEEXPR_contextIMPDOITEMDF_,/* to ...ITEM_ as IOLISTDF is to IOLIST. */
FFEEXPR_contextIMPDOCTRL_,
FFEEXPR_contextDATAIMPDOITEM_,
FFEEXPR_contextDATAIMPDOCTRL_,
FFEEXPR_contextLOC_,
FFEEXPR_contextACTUALARG_, /* Actual arg to function or subroutine;
turns into ACTUALARGEXPR_ if tokens not
NAME (CLOSE_PAREN/COMMA) or PERCENT.... */
FFEEXPR_contextACTUALARGEXPR_, /* Like LET but disallow CHAR*(*)
concats. */
FFEEXPR_contextINDEXORACTUALARG_, /* "CHARACTER FOO; PRINT *,FOO(?". */
FFEEXPR_contextINDEXORACTUALARGEXPR_, /* ? not NAME
(CLOSE_PAREN/COMMA). */
FFEEXPR_contextSFUNCDEFINDEX_, /* INDEX_ within stmt-func def. */
FFEEXPR_contextSFUNCDEFACTUALARG_,
FFEEXPR_contextSFUNCDEFACTUALARGEXPR_,
FFEEXPR_contextSFUNCDEFINDEXORACTUALARG_,
FFEEXPR_contextSFUNCDEFINDEXORACTUALARGEXPR_,
FFEEXPR_contextPAREN_, /* Rhs paren except in LET context. */
FFEEXPR_contextPARENFILENUM_, /* Either PAREN or FILENUM context. */
FFEEXPR_contextPARENFILEUNIT_, /* Either PAREN or FILEUNIT context. */
FFEEXPR_context
} ffeexprContext;
/* Typedefs. */
/* Include files needed by this one. */
#include "bld.h"
#include "lex.h"
#include "malloc.h"
/* Structure definitions. */
typedef ffelexHandler (*ffeexprCallback) (ffelexToken ft, ffebld expr,
ffelexToken t);
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
ffebld ffeexpr_collapse_convert (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_paren (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_uplus (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_uminus (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_not (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_add (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_subtract (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_multiply (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_divide (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_power (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_concatenate (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_lt (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_le (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_eq (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_ne (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_gt (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_ge (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_and (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_or (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_xor (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_eqv (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_neqv (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_symter (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_funcref (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_arrayref (ffebld expr, ffelexToken t);
ffebld ffeexpr_collapse_substr (ffebld expr, ffelexToken t);
ffebld ffeexpr_convert (ffebld source, ffelexToken source_token,
ffelexToken dest_token, ffeinfoBasictype bt, ffeinfoKindtype kt,
ffeinfoRank rk, ffetargetCharacterSize sz,
ffeexprContext context);
ffebld ffeexpr_convert_expr (ffebld source, ffelexToken source_token,
ffebld dest, ffelexToken dest_token,
ffeexprContext context);
ffebld ffeexpr_convert_to_sym (ffebld source, ffelexToken source_token,
ffesymbol dest, ffelexToken dest_token);
void ffeexpr_init_2 (void);
ffelexHandler ffeexpr_rhs (mallocPool pool, ffeexprContext context,
ffeexprCallback callback);
ffelexHandler ffeexpr_lhs (mallocPool pool, ffeexprContext context,
ffeexprCallback callback);
void ffeexpr_terminate_2 (void);
void ffeexpr_type_combine (ffeinfoBasictype *nbt, ffeinfoKindtype *nkt,
ffeinfoBasictype lbt, ffeinfoKindtype lkt,
ffeinfoBasictype rbt, ffeinfoKindtype rkt,
ffelexToken t);
/* Define macros. */
#define ffeexpr_init_0()
#define ffeexpr_init_1()
#define ffeexpr_init_3()
#define ffeexpr_init_4()
#define ffeexpr_terminate_0()
#define ffeexpr_terminate_1()
#define ffeexpr_terminate_3()
#define ffeexpr_terminate_4()
/* End of #include file. */
#endif
This diff is collapsed. Click to expand it.
/* flags.j -- Wrapper for GCC's flags.h
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef MAKING_DEPENDENCIES
#ifndef _J_f_flags
#define _J_f_flags
#include "flags.h"
#endif
#endif
.\" Copyright (c) 1995, 1996 Free Software Foundation -*-Text-*-
.\" See section COPYING for conditions for redistribution
.\" FIXME: no info here on predefines. Should there be? extra for F77...
.TH G77 1 "1997-06-20" "GNU Tools" "GNU Tools"
.de BP
.sp
.ti \-.2i
\(**
..
.SH NAME
g77 \- GNU project F77 Compiler (v0.5.18)
.SH SYNOPSIS
.RB g77 " [" \c
.IR option " | " "filename " ].\|.\|.
.SH WARNING
The information in this man page is an extract from the full
documentation of the GNU Fortran compiler (version 0.5.18),
and is limited to the meaning of the options.
.PP
This man page is not up to date, since no volunteers want to
maintain it. If you find a discrepancy between the man page and the
software, please check the Info file, which is the authoritative
documentation.
.PP
The version of GNU Fortran documented by the Info file is 0.5.21,
which includes substantial improvements and changes since 0.5.18,
the version documented in this man page.
.PP
If we find that the things in this man page that are out of date cause
significant confusion or complaints, we will stop distributing the man
page. The alternative, updating the man page when we update the Info
file, is impractical because the rest of the work of maintaining GNU Fortran
leaves us no time for that. The GNU project regards man pages as
obsolete and should not let them take time away from other things.
.PP
For complete and current documentation, refer to the Info file `\|\c
.B g77\c
\&\|' or the manual
.I
Using and Porting GNU Fortran (for version 0.5.18)\c
\&. Both are made from the Texinfo source file
.BR g77.texi .
.PP
If your system has the `\|\c
.B info\c
\&\|' command installed, the command `\|\c
.B info g77\c
\&\|' should work, unless
.B g77
has not been properly installed.
If your system lacks `\|\c
.B info\c
\&\|', or you wish to avoid using it for now,
the command `\|\c
.B more /usr/info/g77.info*\c
\&\|' should work, unless
.B g77
has not been properly installed.
.PP
If
.B g77
has not been properly installed, so that you
cannot easily access the Info file for it,
ask your system administrator, or the installer
of
.B g77
(if you know who that is) to fix the problem.
.SH DESCRIPTION
The C and F77 compilers are integrated;
.B g77
is a program to call
.B gcc with options to recognize F77.
.B gcc
processes input files
through one or more of four stages: preprocessing, compilation,
assembly, and linking. This man page contains full descriptions for
.I only
F77 specific aspects of the compiler, though it also contains
summaries of some general-purpose options. For a fuller explanation
of the compiler, see
.BR gcc ( 1 ).
For complete documentation on GNU Fortran, type
.BR info g77
F77 source files use the suffix `\|\c
.B .f\c
\&\|'; F77 files to be preprocessed by
.BR cpp ( 1 )
use the suffix `\|\c
.B .F\c
\&\|'.
.SH OPTIONS
There are many command-line options, including options to control
details of optimization, warnings, and code generation, which are
common to both
.B gcc
and
.B g77\c
\&. For full information on all options, see
.BR gcc ( 1 ).
Options must be separate: `\|\c
.B \-dr\c
\&\|' is quite different from `\|\c
.B \-d \-r
\&\|'.
Most `\|\c
.B \-f\c
\&\|' and `\|\c
.B \-W\c
\&\|' options have two contrary forms:
.BI \-f name
and
.BI \-fno\- name\c
\& (or
.BI \-W name
and
.BI \-Wno\- name\c
\&). Only the non-default forms are shown here.
.TP
.B \-c
Compile or assemble the source files, but do not link. The compiler
output is an object file corresponding to each source file.
.TP
.BI \-D macro
Define macro \c
.I macro\c
\& with the string `\|\c
.B 1\c
\&\|' as its definition.
.TP
.BI \-D macro = defn
Define macro \c
.I macro\c
\& as \c
.I defn\c
\&.
.TP
.BI \-\-driver= command
Specifies that
.IR command ,
rather than
.RB ` gcc ',
is to be invoked by
.RB ` g77 '
to do its job. Example: Within the gcc build directory after building
GNU Fortran (but without having to install it),
.nf
./g77 \-\-driver=./xgcc -B./ foo.f
.fi
.TP
.B \-E
Stop after the preprocessing stage; do not run the compiler proper. The
output is preprocessed source code, which is sent to the
standard output.
.TP
.B \-g
Produce debugging information in the operating system's native format
(for DBX or SDB or DWARF). GDB also can work with this debugging
information. On most systems that use DBX format, `\|\c
.B \-g\c
\&\|' enables use
of extra debugging information that only GDB can use.
Unlike most other Fortran compilers, GNU Fortran allows you to use `\|\c
.B \-g\c
\&\|' with
`\|\c
.B \-O\c
\&\|'. The shortcuts taken by optimized code may occasionally
produce surprising results: some variables you declared may not exist
at all; flow of control may briefly move where you did not expect it;
some statements may not be executed because they compute constant
results or their values were already at hand; some statements may
execute in different places because they were moved out of loops.
Nevertheless it proves possible to debug optimized output. This makes
it reasonable to use the optimizer for programs that might have bugs.
.TP
.BI "\-I" "dir"\c
\&
Append directory \c
.I dir\c
\& to the list of directories searched for include files.
.TP
.BI "\-L" "dir"\c
\&
Add directory \c
.I dir\c
\& to the list of directories to be searched
for `\|\c
.B \-l\c
\&\|'.
.TP
.BI \-l library\c
\&
Use the library named \c
.I library\c
\& when linking.
.TP
.B \-nostdinc
Do not search the standard system directories for header files. Only
the directories you have specified with
.B \-I
options (and the current directory, if appropriate) are searched.
.TP
.B \-O
Optimize. Optimizing compilation takes somewhat more time, and a lot
more memory for a large function. See the GCC documentation for
further optimisation options. Loop unrolling, in particular, may be
worth investigating for typical numerical Fortran programs.
.TP
.BI "\-o " file\c
\&
Place output in file \c
.I file\c
\&.
.TP
.B \-S
Stop after the stage of compilation proper; do not assemble. The output
is an assembler code file for each non-assembler input
file specified.
.TP
.BI \-U macro
Undefine macro \c
.I macro\c
\&.
.TP
.B \-v
Print (on standard error output) the commands executed to run the
stages of compilation. Also print the version number of the compiler
driver program and of the preprocessor and the compiler proper. The
version numbers of g77 itself and the GCC distribution on which it is
based are distinct. Use
.RB ` \-\-driver=true '
to disable actual invocation of
.RB ` gcc '
(since
.RB ` true '
is the name of a UNIX command that simply returns success status).
The command
.RB ` "gcc -v" '
is the appropriate one to determine the g77 and GCC version numbers;
it will produce an irrelevant error message from
.RB ` ld '.
.TP
.B \-Wall
Issue warnings for conditions which pertain to usage that we recommend
avoiding and that we believe is easy to avoid, even in conjunction
with macros.
.PP
.SH FILES
.ta \w'LIBDIR/g77\-include 'u
file.h C header (preprocessor) file
.br
file.f Fortran source file
.br
file.for Fortran source file
.br
file.F preprocessed Fortran source file
.br
file.fpp preprocessed Fortran source file
.br
file.s assembly language file
.br
file.o object file
.br
a.out link edited output
.br
\fITMPDIR\fR/cc\(** temporary files
.br
\fILIBDIR\fR/cpp preprocessor
.br
\fILIBDIR\fR/f771 compiler
.br
\fILIBDIR\fR/libf2c.a Fortran run-time library
.br
\fILIBDIR\fR/libgcc.a GCC subroutine library
.br
/lib/crt[01n].o start-up routine
.br
/lib/libc.a standard C library, see
.IR intro (3)
.br
/usr/include standard directory for
.B #include
files
.br
\fILIBDIR\fR/include standard gcc directory for
.B #include
files
.I LIBDIR
is usually
.B /usr/local/lib/\c
.IR machine / version .
.br
.I TMPDIR
comes from the environment variable
.B TMPDIR
(default
.B /usr/tmp
if available, else
.B /tmp\c
\&).
.SH "SEE ALSO"
gcc(1), cpp(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1).
.br
.RB "`\|" g77 "\|', `\|" gcc "\|', `\|" cpp \|',
.RB `\| as \|', `\| ld \|',
and
.RB `\| gdb \|'
entries in
.B info\c
\&.
.br
.I
Using and Porting GNU Fortran (for version 0.5.18)\c
, James Craig Burley;
.I
Using and Porting GNU CC (for version 2.0)\c
, Richard M. Stallman;
.I
The C Preprocessor\c
, Richard M. Stallman;
.I
Debugging with GDB: the GNU Source-Level Debugger\c
, Richard M. Stallman and Roland H. Pesch;
.I
Using as: the GNU Assembler\c
, Dean Elsner, Jay Fenlason & friends;
.I
gld: the GNU linker\c
, Steve Chamberlain and Roland Pesch.
.SH BUGS
For instructions on how to report bugs, see the file
.B DOC
in the g77 distribution.
.SH COPYING
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
.PP
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.
.SH AUTHORS
See the GNU CC Manual for the contributors to GNU CC.
See the GNU Fortran Manual for the contributors to
GNU Fortran.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
970811
This directory contains .diff files for various GNU CC distributions
supported by this version of GNU Fortran.
The name of a file includes which gcc version to which it applies.
For example, 2.7.2.2.diff is the patch file for gcc version 2.7.2.2.
To apply a .diff file to, say, gcc 2.7.2.2, one might use the following
command (where the current directory contains the gcc source distribution
after merging into it the g77 source distribution, which would be
named gcc-2.7.2.2 in this example):
patch -p1 -d gcc-2.7.2.2 < gcc-2.7.2.2/f/gbe/2.7.2.2.diff
This version of g77 is best combined with gcc versions 2.7.2.2.
However, note that applying any of these patches does _not_ update
the gcc.info* files that constitute the Info documentation for gcc.
Therefore, after applying the patch, you must rebuild the Info
documentation yourself via:
cd gcc; make -f Makefile.in gcc.info
If the above command doesn't work because you don't have makeinfo
installed, you are STRONGLY encouraged to obtain the most recent
version of the GNU texinfo package (texinfo-3.11.tar.gz as of this
writing), build, and install it, then try the above command (as
makeinfo is part of texinfo).
This distribution of g77 is not supported for versions of gcc prior
to 2.7.2.2.
If you are using a version of gcc more recent than the most
recent .diff file's version, try the most recent .diff ONLY
if the difference is in the third field. E.g. the above
patch might work on gcc-2.7.3 or gcc-2.7.4 if these were
released. On the other hand, it probably wouldn't work for
a more major release like gcc-2.8.0 or gcc-3.0.0, and you
shouldn't try it. If the .diff file is missing, don't bother
asking <fortran@gnu.ai.mit.edu> for it -- it is certainly
being worked on. In the meantime, watch our progress at
<ftp://alpha.gnu.ai.mit.edu/g77.plan> for information on support
for the recent versions of gcc.
/* glimits.j -- Wrapper for GCC's glimits.h
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef MAKING_DEPENDENCIES
#if !USE_HOST_LIMITS
#include "glimits.h"
#else
#include <limits.h>
#endif
#endif
This diff is collapsed. Click to expand it.
/* global.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
global.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_global
#define _H_f_global
/* Simple definitions and enumerations. */
typedef enum
{
FFEGLOBAL_typeNONE,
FFEGLOBAL_typeMAIN,
FFEGLOBAL_typeEXT, /* EXTERNAL is all we know. */
FFEGLOBAL_typeSUBR,
FFEGLOBAL_typeFUNC,
FFEGLOBAL_typeBDATA,
FFEGLOBAL_typeCOMMON,
FFEGLOBAL_typeANY, /* Confusion reigns, so just ignore. */
FFEGLOBAL_type
} ffeglobalType;
typedef enum
{
FFEGLOBAL_argsummaryNONE, /* No arg present. */
FFEGLOBAL_argsummaryVAL, /* Pass-by-value. */
FFEGLOBAL_argsummaryREF, /* Pass-by-reference. */
FFEGLOBAL_argsummaryDESCR, /* Pass-by-descriptor. */
FFEGLOBAL_argsummaryPROC, /* Procedure (intrinsic, external). */
FFEGLOBAL_argsummarySUBR, /* Subroutine (intrinsic, external). */
FFEGLOBAL_argsummaryFUNC, /* Function (intrinsic, external). */
FFEGLOBAL_argsummaryALTRTN, /* Alternate-return (label). */
FFEGLOBAL_argsummaryPTR, /* Pointer (%LOC, LOC()). */
FFEGLOBAL_argsummaryANY,
FFEGLOBAL_argsummary
} ffeglobalArgSummary;
/* Typedefs. */
typedef struct _ffeglobal_arginfo_ *ffeglobalArgInfo_;
typedef struct _ffeglobal_ *ffeglobal;
/* Include files needed by this one. */
#include "info.h"
#include "lex.h"
#include "name.h"
#include "symbol.h"
#include "target.h"
#include "top.h"
/* Structure definitions. */
struct _ffeglobal_arginfo_
{
ffelexToken t; /* Different from master token when difference is important. */
char *name; /* Name of dummy arg, or NULL if not yet known. */
ffeglobalArgSummary as;
ffeinfoBasictype bt;
ffeinfoKindtype kt;
bool array;
};
struct _ffeglobal_
{
ffelexToken t;
ffename n;
#ifdef FFECOM_globalHOOK
ffecomGlobal hook;
#endif
ffeCounter tick; /* Recent transition in this progunit. */
ffeglobalType type;
bool intrinsic; /* Known as intrinsic? */
bool explicit_intrinsic; /* Explicit intrinsic? */
union {
struct {
ffelexToken initt; /* First initial value. */
bool have_pad; /* Padding info avail for COMMON? */
ffetargetAlign pad; /* Initial padding for COMMON. */
ffewhereLine pad_where_line;
ffewhereColumn pad_where_col;
bool have_save; /* Save info avail for COMMON? */
bool save; /* Save info for COMMON. */
ffewhereLine save_where_line;
ffewhereColumn save_where_col;
bool have_size; /* Size info avail for COMMON? */
long size; /* Size info for COMMON. */
bool blank; /* TRUE if blank COMMON. */
} common;
struct {
bool defined; /* Seen actual code yet? */
ffeinfoBasictype bt; /* NONE for non-function. */
ffeinfoKindtype kt; /* NONE for non-function. */
ffetargetCharacterSize sz;
int n_args; /* 0 for main/blockdata. */
ffelexToken other_t; /* Location of reference. */
ffeglobalArgInfo_ arg_info; /* Info on each argument. */
} proc;
} u;
};
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
void ffeglobal_drive (ffeglobal (*fn) ());
void ffeglobal_init_1 (void);
void ffeglobal_init_common (ffesymbol s, ffelexToken t);
void ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type);
void ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank);
void ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
ffewhereColumn wc);
void ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as,
ffeinfoBasictype bt, ffeinfoKindtype kt,
bool array);
void ffeglobal_proc_def_nargs (ffesymbol s, int n_args);
bool ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as,
ffeinfoBasictype bt, ffeinfoKindtype kt,
bool array, ffelexToken t);
bool ffeglobal_proc_ref_nargs (ffesymbol s, int n_args, ffelexToken t);
ffeglobal ffeglobal_promoted (ffesymbol s);
void ffeglobal_ref_intrinsic (ffesymbol s, ffelexToken t, bool explicit);
bool ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type);
void ffeglobal_save_common (ffesymbol s, bool save, ffewhereLine wl,
ffewhereColumn wc);
bool ffeglobal_size_common (ffesymbol s, long size);
void ffeglobal_terminate_1 (void);
/* Define macros. */
#if FFECOM_targetCURRENT == FFECOM_targetFFE
#define FFEGLOBAL_ENABLED 0
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
#define FFEGLOBAL_ENABLED 1
#else
#error
#endif
#define ffeglobal_common_init(g) ((g)->tick != 0)
#define ffeglobal_common_have_pad(g) ((g)->u.common.have_pad)
#define ffeglobal_common_have_size(g) ((g)->u.common.have_size)
#define ffeglobal_common_size(g) ((g)->u.common.size)
#define ffeglobal_hook(g) ((g)->hook)
#define ffeglobal_init_0()
#define ffeglobal_init_2()
#define ffeglobal_init_3()
#define ffeglobal_init_4()
#define ffeglobal_new_blockdata(s,t) \
ffeglobal_new_progunit_(s,t,FFEGLOBAL_typeBDATA)
#define ffeglobal_new_function(s,t) \
ffeglobal_new_progunit_(s,t,FFEGLOBAL_typeFUNC)
#define ffeglobal_new_program(s,t) \
ffeglobal_new_progunit_(s,t,FFEGLOBAL_typeMAIN)
#define ffeglobal_new_subroutine(s,t) \
ffeglobal_new_progunit_(s,t,FFEGLOBAL_typeSUBR)
#define ffeglobal_pad(g) ((g)->pad)
#define ffeglobal_ref_blockdata(s,t) \
ffeglobal_ref_progunit_(s,t,FFEGLOBAL_typeBDATA)
#define ffeglobal_ref_external(s,t) \
ffeglobal_ref_progunit_(s,t,FFEGLOBAL_typeEXT)
#define ffeglobal_ref_function(s,t) \
ffeglobal_ref_progunit_(s,t,FFEGLOBAL_typeFUNC)
#define ffeglobal_ref_subroutine(s,t) \
ffeglobal_ref_progunit_(s,t,FFEGLOBAL_typeSUBR)
#define ffeglobal_set_hook(g,h) ((g)->hook = (h))
#define ffeglobal_terminate_0()
#define ffeglobal_terminate_2()
#define ffeglobal_terminate_3()
#define ffeglobal_terminate_4()
#define ffeglobal_text(g) ffename_text((g)->n)
#define ffeglobal_type(g) ((g)->type)
/* End of #include file. */
#endif
/* hconfig.j -- Wrapper for GCC's hconfig.h
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef MAKING_DEPENDENCIES
#ifndef _J_f_hconfig
#define _J_f_hconfig
#include "hconfig.h"
#endif
#endif
/* implic.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Related Modules:
None.
Description:
The GNU Fortran Front End.
Modifications:
*/
/* Include files. */
#include "proj.h"
#include <ctype.h>
#include "implic.h"
#include "info.h"
#include "src.h"
#include "symbol.h"
#include "target.h"
/* Externals defined here. */
/* Simple definitions and enumerations. */
typedef enum
{
FFEIMPLIC_stateINITIAL_,
FFEIMPLIC_stateASSUMED_,
FFEIMPLIC_stateESTABLISHED_,
FFEIMPLIC_state
} ffeimplicState_;
/* Internal typedefs. */
typedef struct _ffeimplic_ *ffeimplic_;
/* Private include files. */
/* Internal structure definitions. */
struct _ffeimplic_
{
ffeimplicState_ state;
ffeinfo info;
};
/* Static objects accessed by functions in this module. */
/* NOTE: This is definitely ASCII-specific!! */
static struct _ffeimplic_ ffeimplic_table_['z' - 'A' + 1];
/* Static functions (internal). */
static ffeimplic_ ffeimplic_lookup_ (char c);
/* Internal macros. */
/* ffeimplic_lookup_ -- Look up implicit descriptor for initial character
ffeimplic_ imp;
if ((imp = ffeimplic_lookup_('A')) == NULL)
// error
Returns a pointer to an implicit descriptor block based on the character
passed, or NULL if it is not a valid initial character for an implicit
data type. */
static ffeimplic_
ffeimplic_lookup_ (char c)
{
/* NOTE: This is definitely ASCII-specific!! */
if (isalpha (c) || (c == '_'))
return &ffeimplic_table_[c - 'A'];
return NULL;
}
/* ffeimplic_establish_initial -- Establish type of implicit initial letter
ffesymbol s;
if (!ffeimplic_establish_initial(s))
// error
Assigns implicit type information to the symbol based on the first
character of the symbol's name. */
bool
ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type,
ffeinfoKindtype kind_type, ffetargetCharacterSize size)
{
ffeimplic_ imp;
imp = ffeimplic_lookup_ (c);
if (imp == NULL)
return FALSE; /* Character not A-Z or some such thing. */
if (ffeinfo_basictype (imp->info) == FFEINFO_basictypeNONE)
return FALSE; /* IMPLICIT NONE in effect here. */
switch (imp->state)
{
case FFEIMPLIC_stateINITIAL_:
imp->info = ffeinfo_new (basic_type,
kind_type,
0,
FFEINFO_kindNONE,
FFEINFO_whereNONE,
size);
imp->state = FFEIMPLIC_stateESTABLISHED_;
return TRUE;
case FFEIMPLIC_stateASSUMED_:
if ((ffeinfo_basictype (imp->info) != basic_type)
|| (ffeinfo_kindtype (imp->info) != kind_type)
|| (ffeinfo_size (imp->info) != size))
return FALSE;
imp->state = FFEIMPLIC_stateESTABLISHED_;
return TRUE;
case FFEIMPLIC_stateESTABLISHED_:
return FALSE;
default:
assert ("Weird state for implicit object" == NULL);
return FALSE;
}
}
/* ffeimplic_establish_symbol -- Establish implicit type of a symbol
ffesymbol s;
if (!ffeimplic_establish_symbol(s))
// error
Assigns implicit type information to the symbol based on the first
character of the symbol's name.
If symbol already has a type, return TRUE.
Get first character of symbol's name.
Get ffeimplic_ object for it (return FALSE if NULL returned).
Return FALSE if object has no assigned type (IMPLICIT NONE).
Copy the type information from the object to the symbol.
If the object is state "INITIAL", set to state "ASSUMED" so no
subsequent IMPLICIT statement may change the state.
Return TRUE. */
bool
ffeimplic_establish_symbol (ffesymbol s)
{
char c;
ffeimplic_ imp;
if (ffesymbol_basictype (s) != FFEINFO_basictypeNONE)
return TRUE;
c = *(ffesymbol_text (s));
imp = ffeimplic_lookup_ (c);
if (imp == NULL)
return FALSE; /* First character not A-Z or some such
thing. */
if (ffeinfo_basictype (imp->info) == FFEINFO_basictypeNONE)
return FALSE; /* IMPLICIT NONE in effect here. */
ffesymbol_signal_change (s); /* Gonna change, save existing? */
/* Establish basictype, kindtype, size; preserve rank, kind, where. */
ffesymbol_set_info (s,
ffeinfo_new (ffeinfo_basictype (imp->info),
ffeinfo_kindtype (imp->info),
ffesymbol_rank (s),
ffesymbol_kind (s),
ffesymbol_where (s),
ffeinfo_size (imp->info)));
if (imp->state == FFEIMPLIC_stateINITIAL_)
imp->state = FFEIMPLIC_stateASSUMED_;
if (ffe_is_warn_implicit ())
{
ffebad_start_msg ("Implicit declaration of `%A' at %0",
FFEBAD_severityWARNING);
ffebad_here (0, ffesymbol_where_line (s),
ffesymbol_where_column (s));
ffebad_string (ffesymbol_text (s));
ffebad_finish ();
}
return TRUE;
}
/* ffeimplic_init_2 -- Initialize table
ffeimplic_init_2();
Assigns initial type information to all initial letters.
Allows for holes in the sequence of letters (i.e. EBCDIC). */
void
ffeimplic_init_2 ()
{
ffeimplic_ imp;
char c;
for (c = 'A'; c <= 'z'; ++c)
{
imp = &ffeimplic_table_[c - 'A'];
imp->state = FFEIMPLIC_stateINITIAL_;
switch (c)
{
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case '_':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
imp->info = ffeinfo_new (FFEINFO_basictypeREAL,
FFEINFO_kindtypeREALDEFAULT,
0,
FFEINFO_kindNONE,
FFEINFO_whereNONE,
FFETARGET_charactersizeNONE);
break;
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
imp->info = ffeinfo_new (FFEINFO_basictypeINTEGER,
FFEINFO_kindtypeINTEGERDEFAULT, 0, FFEINFO_kindNONE, FFEINFO_whereNONE,
FFETARGET_charactersizeNONE);
break;
default:
imp->info = ffeinfo_new (FFEINFO_basictypeNONE, FFEINFO_kindtypeNONE, 0,
FFEINFO_kindNONE, FFEINFO_whereNONE, FFETARGET_charactersizeNONE);
break;
}
}
}
/* ffeimplic_none -- Implement IMPLICIT NONE statement
ffeimplic_none();
Assigns null type information to all initial letters. */
void
ffeimplic_none ()
{
ffeimplic_ imp;
for (imp = &ffeimplic_table_[0];
imp != &ffeimplic_table_[ARRAY_SIZE (ffeimplic_table_)];
imp++)
{
imp->info = ffeinfo_new (FFEINFO_basictypeNONE,
FFEINFO_kindtypeNONE,
0,
FFEINFO_kindNONE,
FFEINFO_whereNONE,
FFETARGET_charactersizeNONE);
}
}
/* ffeimplic_peek_symbol_type -- Determine implicit type of a symbol
ffesymbol s;
char *name; // name for s in case it is NULL, or NULL if s never NULL
if (ffeimplic_peek_symbol_type(s,name) == FFEINFO_basictypeCHARACTER)
// is or will be a CHARACTER-typed name
Like establish_symbol, but doesn't change anything.
If symbol is non-NULL and already has a type, return it.
Get first character of symbol's name or from name arg if symbol is NULL.
Get ffeimplic_ object for it (return FALSE if NULL returned).
Return NONE if object has no assigned type (IMPLICIT NONE).
Return the data type indicated in the object.
24-Oct-91 JCB 2.0
Take a char * instead of ffelexToken, since the latter isn't always
needed anyway (as when ffecom calls it). */
ffeinfoBasictype
ffeimplic_peek_symbol_type (ffesymbol s, char *name)
{
char c;
ffeimplic_ imp;
if (s == NULL)
c = *name;
else
{
if (ffesymbol_basictype (s) != FFEINFO_basictypeNONE)
return ffesymbol_basictype (s);
c = *(ffesymbol_text (s));
}
imp = ffeimplic_lookup_ (c);
if (imp == NULL)
return FFEINFO_basictypeNONE; /* First character not A-Z or
something. */
return ffeinfo_basictype (imp->info);
}
/* ffeimplic_terminate_2 -- Terminate table
ffeimplic_terminate_2();
Kills info object for each entry in table. */
void
ffeimplic_terminate_2 ()
{
}
/* implic.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
implic.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_implic
#define _H_f_implic
/* Simple definitions and enumerations. */
/* Typedefs. */
/* Include files needed by this one. */
#include "info.h"
#include "symbol.h"
#include "target.h"
/* Structure definitions. */
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
bool ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type,
ffeinfoKindtype kind_type, ffetargetCharacterSize size);
bool ffeimplic_establish_symbol (ffesymbol s);
void ffeimplic_init_2 (void);
void ffeimplic_none (void);
ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, char *name);
void ffeimplic_terminate_2 (void);
/* Define macros. */
#define ffeimplic_init_0()
#define ffeimplic_init_1()
#define ffeimplic_init_3()
#define ffeimplic_init_4()
#define ffeimplic_terminate_0()
#define ffeimplic_terminate_1()
#define ffeimplic_terminate_3()
#define ffeimplic_terminate_4()
/* End of #include file. */
#endif
/* info-b.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
info.c
Modifications:
*/
FFEINFO_BASICTYPE (FFEINFO_basictypeNONE, "None", "")
FFEINFO_BASICTYPE (FFEINFO_basictypeINTEGER, "INTEGER", "i")
FFEINFO_BASICTYPE (FFEINFO_basictypeLOGICAL, "LOGICAL", "l")
FFEINFO_BASICTYPE (FFEINFO_basictypeREAL, "REAL", "r")
FFEINFO_BASICTYPE (FFEINFO_basictypeCOMPLEX, "COMPLEX", "c")
FFEINFO_BASICTYPE (FFEINFO_basictypeCHARACTER, "CHARACTER", "a")
FFEINFO_BASICTYPE (FFEINFO_basictypeHOLLERITH, "Hollerith", "h")
FFEINFO_BASICTYPE (FFEINFO_basictypeTYPELESS, "Typeless", "t")
FFEINFO_BASICTYPE (FFEINFO_basictypeANY, "Any", "~")
/* info-k.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
info.c
Modifications:
*/
FFEINFO_KIND (FFEINFO_kindNONE, "an unknown kind", "")
FFEINFO_KIND (FFEINFO_kindENTITY, "an entity", "e")
FFEINFO_KIND (FFEINFO_kindFUNCTION, "a function", "f")
FFEINFO_KIND (FFEINFO_kindSUBROUTINE, "a subroutine", "u")
FFEINFO_KIND (FFEINFO_kindPROGRAM, "a program", "p")
FFEINFO_KIND (FFEINFO_kindBLOCKDATA, "a block-data unit", "b")
FFEINFO_KIND (FFEINFO_kindCOMMON, "a common block", "c")
FFEINFO_KIND (FFEINFO_kindCONSTRUCT, "a construct", ":")
FFEINFO_KIND (FFEINFO_kindNAMELIST, "a namelist", "n")
FFEINFO_KIND (FFEINFO_kindANY, "anything", "~")
/* info-w.def -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
info.c
Modifications:
*/
FFEINFO_WHERE (FFEINFO_whereNONE, "None", "")
FFEINFO_WHERE (FFEINFO_whereLOCAL, "Local", "l") /* Defined locally. */
FFEINFO_WHERE (FFEINFO_whereCOMMON, "Common", "c") /* In a common area. */
FFEINFO_WHERE (FFEINFO_whereDUMMY, "Dummy", "d") /* A dummy argument. */
FFEINFO_WHERE (FFEINFO_whereGLOBAL, "Global", "g") /* Reference to external global like FUNCTION, SUBR. */
FFEINFO_WHERE (FFEINFO_whereRESULT, "Result", "r") /* Result of this function. */
FFEINFO_WHERE (FFEINFO_whereFLEETING, "Fleeting", "f") /* Result of "X*Y", "FUNCREF(5,1.3)", "ARRAY(X)", etc. */
FFEINFO_WHERE (FFEINFO_whereFLEETING_CADDR, "Fleet-Const", "fp") /* "A(3)", "CHARS(4:5)". */
FFEINFO_WHERE (FFEINFO_whereFLEETING_IADDR, "Fleet-Immed", "fi") /* A(IX) in "DATA (A(IX),IX=1,100)/.../". */
FFEINFO_WHERE (FFEINFO_whereIMMEDIATE, "Immediate", "i") /* IX in "DATA (A(IX),IX=1,100)/.../". */
FFEINFO_WHERE (FFEINFO_whereINTRINSIC, "Intrinsic", "b")
FFEINFO_WHERE (FFEINFO_whereCONSTANT, "Constant", "p") /* For kindFUNCTION, means statement function! */
FFEINFO_WHERE (FFEINFO_whereCONSTANT_SUBOBJECT, "Const-subobj", "q") /* As in "'FOO'(I:J)". */
FFEINFO_WHERE (FFEINFO_whereANY, "Any", "~")
/* info.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Related Modules:
None
Description:
An abstraction for information maintained on a per-operator and per-
operand basis in expression trees.
Modifications:
30-Aug-90 JCB 2.0
Extensive rewrite for new cleaner approach.
*/
/* Include files. */
#include "proj.h"
#include "info.h"
#include "target.h"
#include "type.h"
/* Externals defined here. */
/* Simple definitions and enumerations. */
/* Internal typedefs. */
/* Private include files. */
/* Internal structure definitions. */
/* Static objects accessed by functions in this module. */
static char *ffeinfo_basictype_string_[]
=
{
#define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) SNAM,
#include "info-b.def"
#undef FFEINFO_BASICTYPE
};
static char *ffeinfo_kind_message_[]
=
{
#define FFEINFO_KIND(KWD,LNAM,SNAM) LNAM,
#include "info-k.def"
#undef FFEINFO_KIND
};
static char *ffeinfo_kind_string_[]
=
{
#define FFEINFO_KIND(KWD,LNAM,SNAM) SNAM,
#include "info-k.def"
#undef FFEINFO_KIND
};
static ffeinfoBasictype ffeinfo_combine_[FFEINFO_basictype][FFEINFO_basictype];
static char *ffeinfo_kindtype_string_[]
=
{
"",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"*",
};
static char *ffeinfo_where_string_[]
=
{
#define FFEINFO_WHERE(KWD,LNAM,SNAM) SNAM,
#include "info-w.def"
#undef FFEINFO_WHERE
};
static ffetype ffeinfo_types_[FFEINFO_basictype][FFEINFO_kindtype]
= { { NULL } };
/* Static functions (internal). */
/* Internal macros. */
/* ffeinfo_basictype_combine -- Combine two basictypes into highest rank type
ffeinfoBasictype i, j, k;
k = ffeinfo_basictype_combine(i,j);
Returns a type based on "standard" operation between two given types. */
ffeinfoBasictype
ffeinfo_basictype_combine (ffeinfoBasictype l, ffeinfoBasictype r)
{
assert (l < FFEINFO_basictype);
assert (r < FFEINFO_basictype);
return ffeinfo_combine_[l][r];
}
/* ffeinfo_basictype_string -- Return tiny string showing the basictype
ffeinfoBasictype i;
printf("%s",ffeinfo_basictype_string(dt));
Returns the string based on the basic type. */
char *
ffeinfo_basictype_string (ffeinfoBasictype basictype)
{
if (basictype >= ARRAY_SIZE (ffeinfo_basictype_string_))
return "?\?\?";
return ffeinfo_basictype_string_[basictype];
}
/* ffeinfo_init_0 -- Initialize
ffeinfo_init_0(); */
void
ffeinfo_init_0 ()
{
ffeinfoBasictype i;
ffeinfoBasictype j;
assert (FFEINFO_basictype == ARRAY_SIZE (ffeinfo_basictype_string_));
assert (FFEINFO_kind == ARRAY_SIZE (ffeinfo_kind_message_));
assert (FFEINFO_kind == ARRAY_SIZE (ffeinfo_kind_string_));
assert (FFEINFO_kindtype == ARRAY_SIZE (ffeinfo_kindtype_string_));
assert (FFEINFO_where == ARRAY_SIZE (ffeinfo_where_string_));
/* Make array that, given two basic types, produces resulting basic type. */
for (i = 0; i < FFEINFO_basictype; ++i)
for (j = 0; j < FFEINFO_basictype; ++j)
if ((i == FFEINFO_basictypeANY) || (j == FFEINFO_basictypeANY))
ffeinfo_combine_[i][j] = FFEINFO_basictypeANY;
else
ffeinfo_combine_[i][j] = FFEINFO_basictypeNONE;
#define same(bt) ffeinfo_combine_[bt][bt] = bt
#define use2(bt1,bt2) ffeinfo_combine_[bt1][bt2] \
= ffeinfo_combine_[bt2][bt1] = bt2
same (FFEINFO_basictypeINTEGER);
same (FFEINFO_basictypeLOGICAL);
same (FFEINFO_basictypeREAL);
same (FFEINFO_basictypeCOMPLEX);
same (FFEINFO_basictypeCHARACTER);
use2 (FFEINFO_basictypeINTEGER, FFEINFO_basictypeREAL);
use2 (FFEINFO_basictypeINTEGER, FFEINFO_basictypeCOMPLEX);
use2 (FFEINFO_basictypeREAL, FFEINFO_basictypeCOMPLEX);
#undef same
#undef use2
}
/* ffeinfo_kind_message -- Return helpful string showing the kind
ffeinfoKind kind;
printf("%s",ffeinfo_kind_message(kind));
Returns the string based on the kind. */
char *
ffeinfo_kind_message (ffeinfoKind kind)
{
if (kind >= ARRAY_SIZE (ffeinfo_kind_message_))
return "?\?\?";
return ffeinfo_kind_message_[kind];
}
/* ffeinfo_kind_string -- Return tiny string showing the kind
ffeinfoKind kind;
printf("%s",ffeinfo_kind_string(kind));
Returns the string based on the kind. */
char *
ffeinfo_kind_string (ffeinfoKind kind)
{
if (kind >= ARRAY_SIZE (ffeinfo_kind_string_))
return "?\?\?";
return ffeinfo_kind_string_[kind];
}
ffeinfoKindtype
ffeinfo_kindtype_max(ffeinfoBasictype bt,
ffeinfoKindtype k1,
ffeinfoKindtype k2)
{
if ((bt == FFEINFO_basictypeANY)
|| (k1 == FFEINFO_kindtypeANY)
|| (k2 == FFEINFO_kindtypeANY))
return FFEINFO_kindtypeANY;
if (ffetype_size (ffeinfo_types_[bt][k1])
> ffetype_size (ffeinfo_types_[bt][k2]))
return k1;
return k2;
}
/* ffeinfo_kindtype_string -- Return tiny string showing the kind type
ffeinfoKindtype kind_type;
printf("%s",ffeinfo_kindtype_string(kind));
Returns the string based on the kind type. */
char *
ffeinfo_kindtype_string (ffeinfoKindtype kind_type)
{
if (kind_type >= ARRAY_SIZE (ffeinfo_kindtype_string_))
return "?\?\?";
return ffeinfo_kindtype_string_[kind_type];
}
void
ffeinfo_set_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype,
ffetype type)
{
assert (basictype < FFEINFO_basictype);
assert (kindtype < FFEINFO_kindtype);
assert (ffeinfo_types_[basictype][kindtype] == NULL);
ffeinfo_types_[basictype][kindtype] = type;
}
ffetype
ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype)
{
assert (basictype < FFEINFO_basictype);
assert (kindtype < FFEINFO_kindtype);
assert (ffeinfo_types_[basictype][kindtype] != NULL);
return ffeinfo_types_[basictype][kindtype];
}
/* ffeinfo_where_string -- Return tiny string showing the where
ffeinfoWhere where;
printf("%s",ffeinfo_where_string(where));
Returns the string based on the where. */
char *
ffeinfo_where_string (ffeinfoWhere where)
{
if (where >= ARRAY_SIZE (ffeinfo_where_string_))
return "?\?\?";
return ffeinfo_where_string_[where];
}
/* ffeinfo_new -- Return object representing datatype, kind, and where info
ffeinfo i;
i = ffeinfo_new(FFEINFO_datatypeINTEGER,FFEINFO_kindSCALAR,
FFEINFO_whereLOCAL);
Returns the string based on the data type. */
#ifndef __GNUC__
ffeinfo
ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype,
ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where,
ffetargetCharacterSize size)
{
ffeinfo i;
i.basictype = basictype;
i.kindtype = kindtype;
i.rank = rank;
i.size = size;
i.kind = kind;
i.where = where;
i.size = size;
return i;
}
#endif
/* info.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
info.c
Modifications:
30-Aug-90 JCB 2.0
Extensive rewrite for new cleaner approach.
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_info
#define _H_f_info
/* Simple definitions and enumerations. */
typedef enum
{
#define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) KWD,
#include "info-b.def"
#undef FFEINFO_BASICTYPE
FFEINFO_basictype
} ffeinfoBasictype;
typedef enum
{ /* If these kindtypes aren't in size order,
change _kindtype_max. */
FFEINFO_kindtypeNONE,
FFEINFO_kindtypeINTEGER1,
FFEINFO_kindtypeINTEGER2,
FFEINFO_kindtypeINTEGER3,
FFEINFO_kindtypeINTEGER4,
FFEINFO_kindtypeINTEGER5,
FFEINFO_kindtypeINTEGER6,
FFEINFO_kindtypeINTEGER7,
FFEINFO_kindtypeINTEGER8,
FFEINFO_kindtypeLOGICAL1 = 1, /* Ok to omit, but ok to overlap. */
FFEINFO_kindtypeLOGICAL2,
FFEINFO_kindtypeLOGICAL3,
FFEINFO_kindtypeLOGICAL4,
FFEINFO_kindtypeLOGICAL5,
FFEINFO_kindtypeLOGICAL6,
FFEINFO_kindtypeLOGICAL7,
FFEINFO_kindtypeLOGICAL8,
FFEINFO_kindtypeREAL1 = 1, /* Ok to omit, but ok to overlap. */
FFEINFO_kindtypeREAL2,
FFEINFO_kindtypeREAL3,
FFEINFO_kindtypeREAL4,
FFEINFO_kindtypeREAL5,
FFEINFO_kindtypeREAL6,
FFEINFO_kindtypeREAL7,
FFEINFO_kindtypeREAL8,
FFEINFO_kindtypeCHARACTER1 = 1, /* Ok to omit, but ok to overlap. */
FFEINFO_kindtypeCHARACTER2,
FFEINFO_kindtypeCHARACTER3,
FFEINFO_kindtypeCHARACTER4,
FFEINFO_kindtypeCHARACTER5,
FFEINFO_kindtypeCHARACTER6,
FFEINFO_kindtypeCHARACTER7,
FFEINFO_kindtypeCHARACTER8,
FFEINFO_kindtypeANY,
FFEINFO_kindtype
} ffeinfoKindtype;
typedef enum
{
#define FFEINFO_KIND(KWD,LNAM,SNAM) KWD,
#include "info-k.def"
#undef FFEINFO_KIND
FFEINFO_kind
} ffeinfoKind;
typedef enum
{
#define FFEINFO_WHERE(KWD,LNAM,SNAM) KWD,
#include "info-w.def"
#undef FFEINFO_WHERE
FFEINFO_where
} ffeinfoWhere;
/* Typedefs. */
typedef struct _ffeinfo_ ffeinfo;
typedef char ffeinfoRank;
/* Include files needed by this one. */
#include "target.h"
#include "type.h"
/* Structure definitions. */
struct _ffeinfo_
{
ffeinfoBasictype basictype;
ffeinfoKindtype kindtype;
ffeinfoRank rank;
ffeinfoKind kind;
ffeinfoWhere where;
ffetargetCharacterSize size;
};
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
ffeinfoBasictype ffeinfo_basictype_combine (ffeinfoBasictype l,
ffeinfoBasictype r);
char *ffeinfo_basictype_string (ffeinfoBasictype basictype);
void ffeinfo_init_0 (void);
char *ffeinfo_kind_message (ffeinfoKind kind);
char *ffeinfo_kind_string (ffeinfoKind kind);
ffeinfoKindtype ffeinfo_kindtype_max(ffeinfoBasictype bt,
ffeinfoKindtype k1,
ffeinfoKindtype k2);
char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type);
char *ffeinfo_where_string (ffeinfoWhere where);
ffeinfo ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype,
ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where,
ffetargetCharacterSize size);
void ffeinfo_set_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype,
ffetype type);
ffetype ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype);
/* Define macros. */
#define ffeinfo_basictype(i) (i.basictype)
#define ffeinfo_init_1()
#define ffeinfo_init_2()
#define ffeinfo_init_3()
#define ffeinfo_init_4()
#define ffeinfo_kind(i) (i.kind)
#define ffeinfo_kindtype(i) (i.kindtype)
#ifdef __GNUC__
#define ffeinfo_new(bt,kt,r,k,w,sz) \
((ffeinfo) {(bt), (kt), (r), (k), (w), (sz)})
#endif
#define ffeinfo_new_any() \
ffeinfo_new (FFEINFO_basictypeANY, FFEINFO_kindtypeANY, 0, \
FFEINFO_kindANY, FFEINFO_whereANY, \
FFETARGET_charactersizeNONE)
#define ffeinfo_new_null() \
ffeinfo_new (FFEINFO_basictypeNONE, FFEINFO_kindtypeNONE, 0, \
FFEINFO_kindNONE, FFEINFO_whereNONE, \
FFETARGET_charactersizeNONE)
#define ffeinfo_rank(i) (i.rank)
#define ffeinfo_size(i) (i.size)
#define ffeinfo_terminate_0()
#define ffeinfo_terminate_1()
#define ffeinfo_terminate_2()
#define ffeinfo_terminate_3()
#define ffeinfo_terminate_4()
#define ffeinfo_use(i) i
#define ffeinfo_where(i) (i.where)
#define FFEINFO_kindtypeINTEGERDEFAULT FFEINFO_kindtypeINTEGER1
#define FFEINFO_kindtypeLOGICALDEFAULT FFEINFO_kindtypeLOGICAL1
#define FFEINFO_kindtypeREALDEFAULT FFEINFO_kindtypeREAL1
#define FFEINFO_kindtypeREALDOUBLE FFEINFO_kindtypeREAL2
#define FFEINFO_kindtypeREALQUAD FFEINFO_kindtypeREAL3
#define FFEINFO_kindtypeCHARACTERDEFAULT FFEINFO_kindtypeCHARACTER1
/* End of #include file. */
#endif
/* input.j -- Wrapper for GCC's input.h
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef MAKING_DEPENDENCIES
#ifndef _J_f_input
#define _J_f_input
#include "input.h"
#endif
#endif
@setfilename INSTALL
@set INSTALLONLY
@c The immediately following lines apply to the INSTALL file
@c which is generated using this file.
This file contains installation information for the GNU Fortran compiler.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
You may copy, distribute, and modify it freely as long as you preserve
this copyright notice and permission notice.
@node Top,,, (dir)
@chapter Installing GNU Fortran
@include install.texi
@bye
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
/* intrin.h -- Public interface for intrin.c
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#ifndef _H_f_intrin
#define _H_f_intrin
#ifndef FFEINTRIN_DOC
#define FFEINTRIN_DOC 0 /* 1 means intrinsic documentation only (intdoc.c). */
#endif
typedef enum
{
FFEINTRIN_familyNONE, /* Not in any family. */
FFEINTRIN_familyF77, /* ANSI FORTRAN 77. */
FFEINTRIN_familyGNU, /* GNU Fortran intrinsics. */
FFEINTRIN_familyF2C, /* f2c intrinsics. */
FFEINTRIN_familyF90, /* Fortran 90. */
FFEINTRIN_familyF95 = FFEINTRIN_familyF90,
FFEINTRIN_familyVXT, /* VAX/VMS FORTRAN. */
FFEINTRIN_familyMIL, /* MIL STD 1753 (MVBITS, etc), in mil, vxt, and f90. */
FFEINTRIN_familyASC, /* ASCII-related (ACHAR, IACHAR), both f2c and f90. */
FFEINTRIN_familyFVZ, /* in both f2c and VAX/VMS FORTRAN. */
FFEINTRIN_familyF2U, /* libf2c/libU77 UNIX system intrinsics. */
FFEINTRIN_familyBADU77, /* libU77 UNIX system intrinsics with bad form. */
FFEINTRIN_family,
} ffeintrinFamily;
typedef enum
{
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
#define DEFGEN(CODE,NAME,SPEC1,SPEC2) FFEINTRIN_gen ## CODE,
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
FFEINTRIN_gen
} ffeintrinGen;
typedef enum
{
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP) FFEINTRIN_spec ## CODE,
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL)
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
FFEINTRIN_spec
} ffeintrinSpec;
typedef enum
{
#define DEFNAME(UPPER,LOWER,MIXED,GEN,SPEC)
#define DEFGEN(CODE,NAME,SPEC1,SPEC2)
#define DEFSPEC(CODE,NAME,CALLABLE,FAMILY,IMP)
#define DEFIMP(CODE,NAME,GFRTDIRECT,GFRTF2C,GFRTGNU,CONTROL) \
FFEINTRIN_imp ## CODE,
#include "intrin.def"
#undef DEFNAME
#undef DEFGEN
#undef DEFSPEC
#undef DEFIMP
FFEINTRIN_imp
} ffeintrinImp;
#if !FFEINTRIN_DOC
#include "bld.h"
#include "info.h"
ffeinfoBasictype ffeintrin_basictype (ffeintrinSpec spec);
ffeintrinFamily ffeintrin_family (ffeintrinSpec spec);
void ffeintrin_fulfill_generic (ffebld *expr, ffeinfo *info, ffelexToken t);
void ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
bool *check_intrin, ffelexToken t);
#if FFECOM_targetCURRENT == FFECOM_targetGCC
ffecomGfrt ffeintrin_gfrt_direct (ffeintrinImp imp);
ffecomGfrt ffeintrin_gfrt_indirect (ffeintrinImp imp);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
void ffeintrin_init_0 (void);
#define ffeintrin_init_1()
#define ffeintrin_init_2()
#define ffeintrin_init_3()
#define ffeintrin_init_4()
bool ffeintrin_is_actualarg (ffeintrinSpec spec);
bool ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit,
ffeintrinGen *gen, ffeintrinSpec *spec,
ffeintrinImp *imp);
bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec);
ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec);
char *ffeintrin_name_generic (ffeintrinGen gen);
char *ffeintrin_name_implementation (ffeintrinImp imp);
char *ffeintrin_name_specific (ffeintrinSpec spec);
ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family);
#define ffeintrin_terminate_0()
#define ffeintrin_terminate_1()
#define ffeintrin_terminate_2()
#define ffeintrin_terminate_3()
#define ffeintrin_terminate_4()
#endif /* !FFEINTRIN_DOC */
/* End of #include file. */
#endif
/* lab.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Related Modules:
Description:
Complex data abstraction for Fortran labels. Maintains a single master
list for all labels; it is expected initialization and termination of
this list will occur on program-unit boundaries.
Modifications:
22-Aug-89 JCB 1.1
Change ffelab_new for new ffewhere interface.
*/
/* Include files. */
#include "proj.h"
#include "lab.h"
#include "malloc.h"
/* Externals defined here. */
ffelab ffelab_list_;
ffelabNumber ffelab_num_news_;
/* Simple definitions and enumerations. */
/* Internal typedefs. */
/* Private include files. */
/* Internal structure definitions. */
/* Static objects accessed by functions in this module. */
/* Static functions (internal). */
/* Internal macros. */
/* ffelab_find -- Find the ffelab object having the desired label value
ffelab l;
ffelabValue v;
l = ffelab_find(v);
If the desired ffelab object doesn't exist, returns NULL.
Straightforward search of list of ffelabs. */
ffelab
ffelab_find (ffelabValue v)
{
ffelab l;
for (l = ffelab_list_; (l != NULL) && (ffelab_value (l) != v); l = l->next)
;
return l;
}
/* ffelab_finish -- Shut down label management
ffelab_finish();
At the end of processing a program unit, call this routine to shut down
label management.
Kill all the labels on the list. */
void
ffelab_finish ()
{
ffelab l;
ffelab pl;
for (pl = NULL, l = ffelab_list_; l != NULL; pl = l, l = l->next)
if (pl != NULL)
malloc_kill_ks (ffe_pool_any_unit (), pl, sizeof (*pl));
if (pl != NULL)
malloc_kill_ks (ffe_pool_any_unit (), pl, sizeof (*pl));
}
/* ffelab_init_3 -- Initialize label management system
ffelab_init_3();
Initialize the label management system. Do this before a new program
unit is going to be processed. */
void
ffelab_init_3 ()
{
ffelab_list_ = NULL;
ffelab_num_news_ = 0;
}
/* ffelab_new -- Create an ffelab object.
ffelab l;
ffelabValue v;
l = ffelab_new(v);
Create a label having a given value. If the value isn't known, pass
FFELAB_valueNONE, and set it later with ffelab_set_value.
Allocate, initialize, and stick at top of label list.
22-Aug-89 JCB 1.1
Change for new ffewhere interface. */
ffelab
ffelab_new (ffelabValue v)
{
ffelab l;
++ffelab_num_news_;
l = (ffelab) malloc_new_ks (ffe_pool_any_unit (), "FFELAB label", sizeof (*l));
l->next = ffelab_list_;
#ifdef FFECOM_labelHOOK
l->hook = FFECOM_labelNULL;
#endif
l->value = v;
l->firstref_line = ffewhere_line_unknown ();
l->firstref_col = ffewhere_column_unknown ();
l->doref_line = ffewhere_line_unknown ();
l->doref_col = ffewhere_column_unknown ();
l->definition_line = ffewhere_line_unknown ();
l->definition_col = ffewhere_column_unknown ();
l->type = FFELAB_typeUNKNOWN;
ffelab_list_ = l;
return l;
}
/* lab.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
lab.c
Modifications:
22-Aug-89 JCB 1.1
Change for new ffewhere interface.
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_lab
#define _H_f_lab
/* Simple definitions and enumerations. */
typedef enum
{
FFELAB_typeUNKNOWN, /* No info yet on label. */
FFELAB_typeANY, /* Label valid for anything, no msgs. */
FFELAB_typeUSELESS, /* No valid way to reference this label. */
FFELAB_typeASSIGNABLE, /* Target of ASSIGN: so FORMAT or BRANCH. */
FFELAB_typeFORMAT, /* FORMAT label. */
FFELAB_typeLOOPEND, /* Target of a labeled DO statement. */
FFELAB_typeNOTLOOP, /* Branch target statement not valid DO
target. */
FFELAB_typeENDIF, /* END IF label. */
FFELAB_type
} ffelabType;
#define FFELAB_valueNONE 0
#define FFELAB_valueMAX 99999
/* Typedefs. */
typedef struct _ffelab_ *ffelab;
typedef ffelab ffelabHandle;
typedef unsigned long ffelabNumber; /* Count of new labels. */
#define ffelabNumber_f "l"
typedef unsigned long ffelabValue;
#define ffelabValue_f "l"
/* Include files needed by this one. */
#include "com.h"
#include "where.h"
/* Structure definitions. */
struct _ffelab_
{
ffelab next;
#ifdef FFECOM_labelHOOK
ffecomLabel hook;
#endif
ffelabValue value; /* 1 through 99999, or 100000+ for temp
labels. */
unsigned long blocknum; /* Managed entirely by user of module. */
ffewhereLine firstref_line;
ffewhereColumn firstref_col;
ffewhereLine doref_line;
ffewhereColumn doref_col;
ffewhereLine definition_line; /* ffewhere_line_unknown() if not
defined. */
ffewhereColumn definition_col;
ffelabType type;
};
/* Global objects accessed by users of this module. */
extern ffelab ffelab_list_;
extern ffelabNumber ffelab_num_news_;
/* Declare functions with prototypes. */
ffelab ffelab_find (ffelabValue v);
void ffelab_finish (void);
void ffelab_init_3 (void);
ffelab ffelab_new (ffelabValue v);
/* Define macros. */
#define ffelab_blocknum(l) ((l)->blocknum)
#define ffelab_definition_column(l) ((l)->definition_col)
#define ffelab_definition_filename(l) \
ffewhere_line_filename((l)->definition_line)
#define ffelab_definition_filelinenum(l) \
ffewhere_line_filelinenum((l)->definition_line)
#define ffelab_definition_line(l) ((l)->definition_line)
#define ffelab_definition_line_number(l) \
ffewhere_line_number((l)->definition_line)
#define ffelab_doref_column(l) ((l)->doref_col)
#define ffelab_doref_filename(l) ffewhere_line_filename((l)->doref_line)
#define ffelab_doref_filelinenum(l) ffewhere_line_filelinenum((l)->doref_line)
#define ffelab_doref_line(l) ((l)->doref_line)
#define ffelab_doref_line_number(l) ffewhere_line_number((l)->doref_line)
#define ffelab_firstref_column(l) ((l)->firstref_col)
#define ffelab_firstref_filename(l) ffewhere_line_filename((l)->firstref_line)
#define ffelab_firstref_filelinenum(l) \
ffewhere_line_filelinenum((l)->firstref_line)
#define ffelab_firstref_line(l) ((l)->firstref_line)
#define ffelab_firstref_line_number(l) ffewhere_line_number((l)->firstref_line)
#define ffelab_handle_done(h)
#define ffelab_handle_first() ((ffelabHandle) ffelab_list_)
#define ffelab_handle_next(h) ((ffelabHandle) (((ffelab) h)->next))
#define ffelab_handle_target(h) ((ffelab) h)
#define ffelab_hook(l) ((l)->hook)
#define ffelab_init_0()
#define ffelab_init_1()
#define ffelab_init_2()
#define ffelab_init_4()
#define ffelab_kill(l) ffelab_set_value(l,FFELAB_valueNONE);
#define ffelab_new_generated() (ffelab_new(ffelab_generated_++))
#define ffelab_number() (ffelab_num_news_)
#define ffelab_set_blocknum(l,b) ((l)->blocknum = (b))
#define ffelab_set_definition_column(l,cn) ((l)->definition_col = (cn))
#define ffelab_set_definition_line(l,ln) ((l)->definition_line = (ln))
#define ffelab_set_doref_column(l,cn) ((l)->doref_col = (cn))
#define ffelab_set_doref_line(l,ln) ((l)->doref_line = (ln))
#define ffelab_set_firstref_column(l,cn) ((l)->firstref_col = (cn))
#define ffelab_set_firstref_line(l,ln) ((l)->firstref_line = (ln))
#define ffelab_set_hook(l,h) ((l)->hook = (h))
#define ffelab_set_type(l,t) ((l)->type = (t))
#define ffelab_terminate_0()
#define ffelab_terminate_1()
#define ffelab_terminate_2()
#define ffelab_terminate_3()
#define ffelab_terminate_4()
#define ffelab_type(l) ((l)->type)
#define ffelab_value(l) ((l)->value)
/* End of #include file. */
#endif
/* lang-options.h file for Fortran
Copyright (C) 1995-1997 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
/* This is the contribution to the `lang_options' array in gcc.c for
g77. */
#ifdef __STDC__ /* To be consistent with lang-specs.h. Maybe avoid
overflowing some old compiler's tables, etc. */
"-fversion",
"-fnull-version",
"-fset-g77-defaults",
/*"-fident",*/
/*"-fno-ident",*/
"-ff66",
"-fno-f66",
"-ff77",
"-fno-f77",
"-ff90",
"-fno-f90",
"-fautomatic",
"-fno-automatic",
"-fdollar-ok",
"-fno-dollar-ok",
"-ff2c",
"-fno-f2c",
"-ff2c-library",
"-fno-f2c-library",
"-ffree-form",
"-fno-free-form",
"-ffixed-form",
"-fno-fixed-form",
"-fpedantic",
"-fno-pedantic",
"-fvxt",
"-fno-vxt",
"-fugly",
"-fno-ugly",
"-fugly-args",
"-fno-ugly-args",
"-fugly-assign",
"-fno-ugly-assign",
"-fugly-assumed",
"-fno-ugly-assumed",
"-fugly-comma",
"-fno-ugly-comma",
"-fugly-complex",
"-fno-ugly-complex",
"-fugly-init",
"-fno-ugly-init",
"-fugly-logint",
"-fno-ugly-logint",
"-fxyzzy",
"-fno-xyzzy",
"-finit-local-zero",
"-fno-init-local-zero",
"-fbackslash",
"-fno-backslash",
"-femulate-complex",
"-fno-emulate-complex",
"-funderscoring",
"-fno-underscoring",
"-fsecond-underscore",
"-fno-second-underscore",
"-fintrin-case-initcap",
"-fintrin-case-upper",
"-fintrin-case-lower",
"-fintrin-case-any",
"-fmatch-case-initcap",
"-fmatch-case-upper",
"-fmatch-case-lower",
"-fmatch-case-any",
"-fsource-case-upper",
"-fsource-case-lower",
"-fsource-case-preserve",
"-fsymbol-case-initcap",
"-fsymbol-case-upper",
"-fsymbol-case-lower",
"-fsymbol-case-any",
"-fcase-strict-upper",
"-fcase-strict-lower",
"-fcase-initcap",
"-fcase-upper",
"-fcase-lower",
"-fcase-preserve",
"-fdcp-intrinsics-delete",
"-fdcp-intrinsics-hide",
"-fdcp-intrinsics-disable",
"-fdcp-intrinsics-enable",
"-ff2c-intrinsics-delete",
"-ff2c-intrinsics-hide",
"-ff2c-intrinsics-disable",
"-ff2c-intrinsics-enable",
"-ff90-intrinsics-delete",
"-ff90-intrinsics-hide",
"-ff90-intrinsics-disable",
"-ff90-intrinsics-enable",
"-fmil-intrinsics-delete",
"-fmil-intrinsics-hide",
"-fmil-intrinsics-disable",
"-fmil-intrinsics-enable",
"-funix-intrinsics-delete",
"-funix-intrinsics-hide",
"-funix-intrinsics-disable",
"-funix-intrinsics-enable",
"-fvxt-intrinsics-delete",
"-fvxt-intrinsics-hide",
"-fvxt-intrinsics-disable",
"-fvxt-intrinsics-enable",
"-fzeros",
"-fno-zeros",
"-fdebug-kludge",
"-fno-debug-kludge",
"-fonetrip",
"-fno-onetrip",
"-fsilent",
"-fno-silent",
"-fglobals",
"-fno-globals",
"-ftypeless-boz",
"-fno-typeless-boz",
"-Wglobals",
"-Wno-globals",
/*"-Wimplicit",*/
/*"-Wno-implicit",*/
"-Wsurprising",
"-Wno-surprising",
/*"-Wall",*/
/* Prefix options. */
"-I",
"-ffixed-line-length-",
#endif
/* lang-specs.h file for Fortran
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
/* This is the contribution to the `default_compilers' array in gcc.c for
g77. */
#ifdef __STDC__ /* Else stringizing of OO below won't work, but in
K&R case we're not building the f77 language. */
#ifdef OBJECT_SUFFIX /* Not defined compiling gcc.c prior to 2.7.0. */
#define OO "%O"
#else
#define OO ".o"
#endif
{".F", "@f77-cpp-input"},
{".fpp", "@f77-cpp-input"},
{"@f77-cpp-input",
/* For f77 we want -traditional to avoid errors with, for
instance, mismatched '. Also, we avoid unpleasant surprises
with substitution of names not prefixed by `_' by using %P
rather than %p (although this isn't consistent with SGI and
Sun f77, at least) so you test `__unix' rather than `unix'.
-D_LANGUAGE_FORTRAN is used by some compilers like SGI and
might as well be in there. */
"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
%c %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
%i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
"%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} -fset-g77-defaults %(f771) \
%{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a}\
%{g*} %{O*} %{W*} %{w} %{pedantic*} \
%{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
%{aux-info*}\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %a %Y\
%{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
%{!pipe:%g.s} %A\n }}}}"},
{".r", "@ratfor"},
{"@ratfor",
"ratfor %{C} %{v}\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{!E:%{!pipe:-o %g.f}}%{E:%W{o*}} %i |\n",
"%{!E:f771 %{!pipe:%g.f} -fset-g77-defaults %(f771) \
%{!Q:-quiet} -dumpbase %b.r %{d*} %{m*} %{a}\
%{g*} %{O*} %{W*} %{w} %{pedantic*} \
%{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
%{aux-info*}\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %a %Y\
%{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
%{!pipe:%g.s} %A\n }}"},
{".f", "@f77"},
{".for", "@f77"},
{"@f77",
"%{!M:%{!MM:%{!E:f771 %i -fset-g77-defaults %(f771) \
%{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a}\
%{g*} %{O*} %{W*} %{w} %{pedantic*}\
%{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
%{aux-info*}\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
%{!S:as %a %Y\
%{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
%{!pipe:%g.s} %A\n }}}}"},
#undef OO
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
/* lex.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
lex.c
Modifications:
22-Aug-89 JCB 1.1
Change for new ffewhere interface.
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_lex
#define _H_f_lex
/* Simple definitions and enumerations. */
typedef enum
{
FFELEX_typeNONE,
FFELEX_typeCOMMENT,
FFELEX_typeEOS,
FFELEX_typeEOF,
FFELEX_typeERROR,
FFELEX_typeRAW,
FFELEX_typeQUOTE,
FFELEX_typeDOLLAR,
FFELEX_typeHASH,
FFELEX_typePERCENT,
FFELEX_typeAMPERSAND,
FFELEX_typeAPOSTROPHE,
FFELEX_typeOPEN_PAREN,
FFELEX_typeCLOSE_PAREN,
FFELEX_typeASTERISK,
FFELEX_typePLUS,
FFELEX_typeMINUS,
FFELEX_typePERIOD,
FFELEX_typeSLASH,
FFELEX_typeNUMBER, /* Grep: [0-9][0-9]*. */
FFELEX_typeOPEN_ANGLE,
FFELEX_typeEQUALS,
FFELEX_typeCLOSE_ANGLE,
FFELEX_typeNAME, /* Grep: [A-Za-z][A-Za-z0-9_]*. */
FFELEX_typeCOMMA,
FFELEX_typePOWER, /* "**". */
FFELEX_typeCONCAT, /* "//". */
FFELEX_typeDEBUG,
FFELEX_typeNAMES, /* Same as FFELEX_typeNAME in initial
context. */
FFELEX_typeHOLLERITH, /* <text> part of <nn>H<text>. */
FFELEX_typeCHARACTER, /* <text> part of '<text>' or "<text>". */
FFELEX_typeCOLON,
FFELEX_typeSEMICOLON,
FFELEX_typeUNDERSCORE,
FFELEX_typeQUESTION,
FFELEX_typeOPEN_ARRAY, /* "(/". */
FFELEX_typeCLOSE_ARRAY, /* "/)". */
FFELEX_typeCOLONCOLON, /* "::". */
FFELEX_typeREL_LE, /* "<=". */
FFELEX_typeREL_NE, /* "<>". */
FFELEX_typeREL_EQ, /* "==". */
FFELEX_typePOINTS, /* "=>". */
FFELEX_typeREL_GE, /* ">=". */
FFELEX_type
} ffelexType;
/* Typedefs. */
typedef struct _lextoken_ *ffelexToken;
typedef void *lex_sigh_;
typedef lex_sigh_ (*lex_sigh__) (ffelexToken);
typedef lex_sigh__ (*ffelexHandler) (ffelexToken);
/* Include files needed by this one. */
#include <ctype.h>
#include "top.h"
#include "where.h"
/* Structure definitions. */
struct _lextoken_
{
long int id_; /* DEBUG ONLY. */
ffeTokenLength size;
ffeTokenLength length;
unsigned short uses;
char *text;
ffelexType type;
ffewhereLine where_line;
ffewhereColumn where_col;
ffewhereLine currentnames_line; /* For tracking NAMES tokens. */
ffewhereColumn currentnames_col; /* For tracking NAMES tokens. */
ffewhereTrack wheretrack; /* For tracking NAMES tokens. */
};
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
void ffelex_display_token (ffelexToken t);
bool ffelex_expecting_character (void);
ffelexHandler ffelex_file_fixed (ffewhereFile wf, FILE *f);
ffelexHandler ffelex_file_free (ffewhereFile wf, FILE *f);
void ffelex_hash_kludge (FILE *f);
void ffelex_init_1 (void);
bool ffelex_is_names_expected (void);
char *ffelex_line (void);
ffewhereColumnNumber ffelex_line_length (void);
ffewhereLineNumber ffelex_line_number (void);
void ffelex_set_expecting_hollerith (long length, char which,
ffewhereLine line,
ffewhereColumn column);
void ffelex_set_handler (ffelexHandler first);
void ffelex_set_hexnum (bool on);
void ffelex_set_include (ffewhereFile wf, bool free_form, FILE *fi);
void ffelex_set_names (bool on);
void ffelex_set_names_pure (bool on);
ffelexHandler ffelex_splice_tokens (ffelexHandler first, ffelexToken master,
ffeTokenLength start);
ffelexHandler ffelex_swallow_tokens (ffelexToken t, ffelexHandler handler);
ffelexToken ffelex_token_dollar_from_names (ffelexToken t,
ffeTokenLength start);
void ffelex_token_kill (ffelexToken t);
ffelexToken ffelex_token_name_from_names (ffelexToken t,
ffeTokenLength start,
ffeTokenLength len);
ffelexToken ffelex_token_names_from_names (ffelexToken t,
ffeTokenLength start,
ffeTokenLength len);
ffelexToken ffelex_token_new (void);
ffelexToken ffelex_token_new_character (char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_eof (void);
ffelexToken ffelex_token_new_name (char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_names (char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_number (char *s, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_new_simple_ (ffelexType type, ffewhereLine l,
ffewhereColumn c);
ffelexToken ffelex_token_number_from_names (ffelexToken t,
ffeTokenLength start);
ffelexToken ffelex_token_uscore_from_names (ffelexToken t,
ffeTokenLength start);
ffelexToken ffelex_token_use (ffelexToken t);
/* Define macros. */
#define ffelex_init_0()
#define ffelex_init_2()
#define ffelex_init_3()
#define ffelex_init_4()
#define ffelex_is_firstnamechar(c) \
(isalpha ((c)) || ((c) == '_'))
#define ffelex_terminate_0()
#define ffelex_terminate_1()
#define ffelex_terminate_2()
#define ffelex_terminate_3()
#define ffelex_terminate_4()
#define ffelex_token_length(t) ((t)->length)
#define ffelex_token_new_eos(l,c) \
ffelex_token_new_simple_ (FFELEX_typeEOS, (l), (c))
#define ffelex_token_new_period(l,c) \
ffelex_token_new_simple_ (FFELEX_typePERIOD, (l), (c))
#define ffelex_token_strcmp(t1,t2) strcmp ((t1)->text, (t2)->text)
#define ffelex_token_text(t) ((t)->text)
#define ffelex_token_type(t) ((t)->type)
#define ffelex_token_where_column(t) ((t)->where_col)
#define ffelex_token_where_filename(t) \
ffewhere_line_filename ((t)->where_line)
#define ffelex_token_where_filelinenum(t) \
ffewhere_line_filelinenum((t)->where_line)
#define ffelex_token_where_line(t) ((t)->where_line)
#define ffelex_token_where_line_number(t) \
ffewhere_line_number ((t)->where_line)
#define ffelex_token_wheretrack(t) ((t)->wheretrack)
/* End of #include file. */
#endif
This diff is collapsed. Click to expand it.
/* malloc.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
malloc.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_malloc
#define _H_f_malloc
#ifndef MALLOC_DEBUG
#define MALLOC_DEBUG 0 /* 1 means check caller's use of this module. */
#endif
/* Simple definitions and enumerations. */
typedef enum
{
MALLOC_typeKS_,
MALLOC_typeKSR_,
MALLOC_typeKP_,
MALLOC_typeKPR_,
MALLOC_typeUS_,
MALLOC_typeUSR_,
MALLOC_type_
} mallocType_;
/* Typedefs. */
typedef struct _malloc_area_ *mallocArea_;
typedef struct _malloc_pool_ *mallocPool;
typedef unsigned long int mallocSize;
#define mallocSize_f "l"
/* Include files needed by this one. */
/* Structure definitions. */
struct _malloc_area_
{
mallocArea_ next;
mallocArea_ previous;
void *where;
#if MALLOC_DEBUG
mallocSize size;
mallocType_ type;
#endif
char name[1];
};
struct _malloc_pool_
{
mallocPool next;
mallocPool previous;
mallocPool eldest;
mallocPool youngest;
mallocArea_ first;
mallocArea_ last;
unsigned long uses;
#if MALLOC_DEBUG
mallocSize allocated;
mallocSize freed;
mallocSize old_sizes;
mallocSize new_sizes;
unsigned long allocations;
unsigned long frees;
unsigned long resizes;
#endif
char name[1];
};
struct _malloc_root_
{
struct _malloc_pool_ malloc_pool_image_;
};
/* Global objects accessed by users of this module. */
extern struct _malloc_root_ malloc_root_;
/* Declare functions with prototypes. */
void malloc_display_ (mallocArea_ a);
mallocArea_ malloc_find_inpool_ (mallocPool pool, void *ptr);
void malloc_init (void);
void malloc_kill_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
mallocSize size);
void *malloc_new_ (mallocSize size);
void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name,
mallocSize size);
void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name,
mallocSize size, int z);
void malloc_pool_display (mallocPool p);
char malloc_pool_find_ (mallocPool p, mallocPool parent);
void malloc_pool_kill (mallocPool p);
mallocPool malloc_pool_new (char *name, mallocPool parent, unsigned long chunks);
mallocPool malloc_pool_use (mallocPool p);
void *malloc_resize_ (void *ptr, mallocSize new_size);
void *malloc_resize_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
mallocSize new_size, mallocSize old_size);
void malloc_verify_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
mallocSize size);
/* Define macros. */
#define malloc_new_ks(pool,name,size) \
malloc_new_inpool_ (pool,MALLOC_typeKS_,name,size)
#define malloc_new_ksr(pool,name,size) \
malloc_new_inpool_ (pool,MALLOC_typeKSR_,name,size)
#define malloc_new_kp(pool,name,size) \
malloc_new_inpool_ (pool,MALLOC_typeKP_,name,size)
#define malloc_new_kpr(pool,name,size) \
malloc_new_inpool_ (pool,MALLOC_typeKPR_,name,size)
#define malloc_new_us(pool,name,size) \
malloc_new_inpool_ (pool,MALLOC_typeUS_,name,size)
#define malloc_new_usr(pool,name,size) \
malloc_new_inpool_ (pool,MALLOC_typeUSR_,name,size)
#define malloc_new_zks(pool,name,size,z) \
malloc_new_zinpool_ (pool,MALLOC_typeKS_,name,size,z)
#define malloc_new_zksr(pool,name,size,z) \
malloc_new_zinpool_ (pool,MALLOC_typeKSR_,name,size,z)
#define malloc_new_zkp(pool,name,size,z) \
malloc_new_zinpool_ (pool,MALLOC_typeKP_,name,size,z)
#define malloc_new_zkpr(pool,name,size,z) \
malloc_new_zinpool_ (pool,MALLOC_typeKPR_,name,size,z)
#define malloc_new_zus(pool,name,size,z) \
malloc_new_zinpool_ (pool,MALLOC_typeUS_,name,size,z)
#define malloc_new_zusr(pool,name,size,z) \
malloc_new_zinpool_ (pool,MALLOC_typeUSR_,name,size,z)
#define malloc_kill_ks(pool,ptr,size) \
malloc_kill_inpool_ (pool,MALLOC_typeKS_,ptr,size)
#define malloc_kill_ksr(pool,ptr,size) \
malloc_kill_inpool_ (pool,MALLOC_typeKSR_,ptr,size)
#define malloc_kill_us(pool,ptr) \
malloc_kill_inpool_ (pool,MALLOC_typeUS_,ptr,0)
#define malloc_kill_usr(pool,ptr) \
malloc_kill_inpool_ (pool,MALLOC_typeUSR_,ptr,0)
#define malloc_pool_image() (&malloc_root_.malloc_pool_image_)
#define malloc_resize_ksr(pool,ptr,new_size,old_size) \
malloc_resize_inpool_ (pool,MALLOC_typeKSR_,ptr,new_size,old_size)
#define malloc_resize_kpr(pool,ptr,new_size,old_size) \
malloc_resize_inpool_ (pool,MALLOC_typeKPR_,ptr,new_size,old_size)
#define malloc_resize_usr(pool,ptr,new_size) \
malloc_resize_inpool_ (pool,MALLOC_typeUSR_,ptr,new_size,0)
#define malloc_verify_kp(pool,name,size) \
malloc_verify_inpool_ (pool,MALLOC_typeKP_,name,size)
#define malloc_verify_kpr(pool,name,size) \
malloc_verify_inpool_ (pool,MALLOC_typeKPR_,name,size)
#define malloc_verify_ks(pool,ptr,size) \
malloc_verify_inpool_ (pool,MALLOC_typeKS_,ptr,size)
#define malloc_verify_ksr(pool,ptr,size) \
malloc_verify_inpool_ (pool,MALLOC_typeKSR_,ptr,size)
#define malloc_verify_us(pool,ptr) \
malloc_verify_inpool_ (pool,MALLOC_typeUS_,ptr,0)
#define malloc_verify_usr(pool,ptr) \
malloc_verify_inpool_ (pool,MALLOC_typeUSR_,ptr,0)
/* End of #include file. */
#endif
/* name.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Related Modules:
None.
Description:
Name and name space abstraction.
Modifications:
*/
/* Include files. */
#include "proj.h"
#include "bad.h"
#include "name.h"
#include "lex.h"
#include "malloc.h"
#include "src.h"
#include "where.h"
/* Externals defined here. */
/* Simple definitions and enumerations. */
/* Internal typedefs. */
/* Private include files. */
/* Internal structure definitions. */
/* Static objects accessed by functions in this module. */
/* Static functions (internal). */
static ffename ffename_lookup_ (ffenameSpace ns, ffelexToken t, bool *found);
/* Internal macros. */
/* Searches for and returns the matching ffename object, or returns a
pointer to the name before which the new name should go. */
static ffename
ffename_lookup_ (ffenameSpace ns, ffelexToken t, bool *found)
{
ffename n;
for (n = ns->first; n != (ffename) &ns->first; n = n->next)
{
if (ffelex_token_strcmp (t, n->t) == 0)
{
*found = TRUE;
return n;
}
}
*found = FALSE;
return n; /* (n == (ffename) &ns->first) */
}
/* Searches for and returns the matching ffename object, or creates a new
one (with a NULL ffesymbol) and returns that. If last arg is TRUE,
check whether token meets character-content requirements (such as
"all characters must be uppercase", as determined by
ffesrc_bad_char_symbol (), issue diagnostic if it doesn't. */
ffename
ffename_find (ffenameSpace ns, ffelexToken t)
{
ffename n;
ffename newn;
bool found;
assert (ns != NULL);
assert ((t != NULL) && ((ffelex_token_type (t) == FFELEX_typeNAME)
|| (ffelex_token_type (t) == FFELEX_typeNAMES)));
n = ffename_lookup_ (ns, t, &found);
if (found)
return n;
newn = (ffename) malloc_new_ks (ns->pool, "FFENAME name", sizeof (*n));
newn->next = n;
newn->previous = n->previous;
n->previous = newn;
newn->previous->next = newn;
newn->t = ffelex_token_use (t);
newn->u.s = NULL;
return newn;
}
/* ffename_kill -- Kill name from name space
ffenameSpace ns;
ffename s;
ffename_kill(ns,s);
Removes the name from the name space. */
void
ffename_kill (ffenameSpace ns, ffename n)
{
assert (ns != NULL);
assert (n != NULL);
ffelex_token_kill (n->t);
n->next->previous = n->previous;
n->previous->next = n->next;
malloc_kill_ks (ns->pool, n, sizeof (*n));
}
/* ffename_lookup -- Look up name in name space
ffenameSpace ns;
ffelexToken t;
ffename s;
n = ffename_lookup(ns,t);
Searches for and returns the matching ffename object, or returns NULL. */
ffename
ffename_lookup (ffenameSpace ns, ffelexToken t)
{
ffename n;
bool found;
assert (ns != NULL);
assert ((t != NULL) && ((ffelex_token_type (t) == FFELEX_typeNAME)
|| (ffelex_token_type (t) == FFELEX_typeNAMES)));
n = ffename_lookup_ (ns, t, &found);
return found ? n : NULL;
}
/* ffename_space_drive_global -- Call given fn for each global in name space
ffenameSpace ns;
ffeglobal (*fn)();
ffename_space_drive_global(ns,fn); */
void
ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ())
{
ffename n;
if (ns == NULL)
return;
for (n = ns->first; n != (ffename) &ns->first; n = n->next)
{
if (n->u.g != NULL)
n->u.g = (*fn) (n->u.g);
}
}
/* ffename_space_drive_symbol -- Call given fn for each symbol in name space
ffenameSpace ns;
ffesymbol (*fn)();
ffename_space_drive_symbol(ns,fn); */
void
ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ())
{
ffename n;
if (ns == NULL)
return;
for (n = ns->first; n != (ffename) &ns->first; n = n->next)
{
if (n->u.s != NULL)
n->u.s = (*fn) (n->u.s);
}
}
/* ffename_space_kill -- Kill name space
ffenameSpace ns;
ffename_space_kill(ns);
Removes the names from the name space; kills the name space. */
void
ffename_space_kill (ffenameSpace ns)
{
assert (ns != NULL);
while (ns->first != (ffename) &ns->first)
ffename_kill (ns, ns->first);
malloc_kill_ks (ns->pool, ns, sizeof (*ns));
}
/* ffename_space_new -- Create name space
ffenameSpace ns;
ns = ffename_space_new(malloc_pool_image());
Create new name space. */
ffenameSpace
ffename_space_new (mallocPool pool)
{
ffenameSpace ns;
ns = (ffenameSpace) malloc_new_ks (pool, "FFENAME space",
sizeof (*ns));
ns->first = (ffename) &ns->first;
ns->last = (ffename) &ns->first;
ns->pool = pool;
return ns;
}
/* name.h -- Public #include File (module.h template V1.0)
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Owning Modules:
name.c
Modifications:
*/
/* Allow multiple inclusion to work. */
#ifndef _H_f_name
#define _H_f_name
/* Simple definitions and enumerations. */
/* Typedefs. */
typedef struct _ffename_ *ffename;
typedef struct _ffename_space_ *ffenameSpace;
/* Include files needed by this one. */
#include "global.h"
#include "lex.h"
#include "malloc.h"
#include "symbol.h"
/* Structure definitions. */
struct _ffename_
{
ffename next;
ffename previous;
ffelexToken t;
union
{
ffesymbol s;
ffeglobal g;
}
u;
};
struct _ffename_space_
{
ffename first;
ffename last;
mallocPool pool;
};
/* Global objects accessed by users of this module. */
/* Declare functions with prototypes. */
ffename ffename_find (ffenameSpace ns, ffelexToken t);
void ffename_kill (ffenameSpace ns, ffename n);
ffename ffename_lookup (ffenameSpace ns, ffelexToken t);
void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ());
void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ());
void ffename_space_kill (ffenameSpace ns);
ffenameSpace ffename_space_new (mallocPool pool);
/* Define macros. */
#define ffename_first_token(n) ((n)->t)
#define ffename_global(n) ((n)->u.g)
#define ffename_init_0()
#define ffename_init_1()
#define ffename_init_2()
#define ffename_init_3()
#define ffename_init_4()
#define ffename_set_global(n,glob) ((n)->u.g = (glob))
#define ffename_set_symbol(n,sym) ((n)->u.s = (sym))
#define ffename_symbol(n) ((n)->u.s)
#define ffename_terminate_0()
#define ffename_terminate_1()
#define ffename_terminate_2()
#define ffename_terminate_3()
#define ffename_terminate_4()
#define ffename_text(n) ffelex_token_text((n)->t)
#define ffename_token(n) ((n)->t)
#define ffename_where_filename(n) ffelex_token_where_filename((n)->t)
#define ffename_where_filelinenum(n) ffelex_token_where_filelinenum((n)->t)
#define ffename_where_line(n) ffelex_token_where_line((n)->t)
#define ffename_where_column(n) ffelex_token_where_column((n)->t)
/* End of #include file. */
#endif
This diff is collapsed. Click to expand it.
@setfilename NEW
@set NEWSONLY
@c The immediately following lines apply to the NEWS file
@c which is generated using this file.
This file lists recent changes to the GNU Fortran compiler.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
You may copy, distribute, and modify it freely as long as you preserve
this copyright notice and permission notice.
@node Top,,, (dir)
@chapter News About GNU Fortran
@include news.texi
@bye
/* GNU Fortran
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include "proj.h"
#include <ctype.h>
#include <signal.h>
#include "top.h"
#include "com.h"
#include "where.h"
#include "zzz.h"
#if FFECOM_targetCURRENT == FFECOM_targetGCC
#include "flags.j"
#endif
#define NAME_OF_STDIN "<stdin>"
#if FFECOM_targetCURRENT == FFECOM_targetFFE
void
main (int argc, char *argv[])
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
FILE *finput;
int
yyparse ()
#else
#error
#endif
{
ffewhereFile wf;
if (ffe_is_version ())
fprintf (stderr, "GNU Fortran Front End version %s compiled: %s %s\n",
ffezzz_version_string,
ffezzz_date,
ffezzz_time);
#if FFECOM_targetCURRENT == FFECOM_targetFFE
ffe_init_0 ();
for (--argc, ++argv; argc > 0; --argc, ++argv)
{
if (!ffe_decode_option (argv[0]))
fprintf (stderr, "Unrecognized option: %s\n", argv[0]);
}
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
if (!ffe_is_pedantic ())
ffe_set_is_pedantic (pedantic);
#else
#error
#endif
#if FFECOM_targetCURRENT == FFECOM_targetFFE
wf = ffewhere_file_new (NAME_OF_STDIN, strlen (NAME_OF_STDIN));
ffecom_file (NAME_OF_STDIN);
ffe_file (wf, stdin);
#elif FFECOM_targetCURRENT == FFECOM_targetGCC
wf = ffewhere_file_new (main_input_filename, strlen (main_input_filename));
ffecom_file (main_input_filename);
ffe_file (wf, finput);
#else
#error
#endif
#if FFECOM_targetCURRENT == FFECOM_targetGCC
ffecom_finish_compile ();
return 0;
#elif FFECOM_targetCURRENT == FFECOM_targetFFE
ffe_terminate_0 ();
exit (0);
#else
#error
#endif
}
/* proj.c file for GNU Fortran
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include "proj.h"
#include <ctype.h>
#include "glimits.j"
#if !FFEPROJ_STRTOUL
unsigned long int
strtoul (const char *nptr, char **endptr, int base)
{
unsigned long int number = 0;
unsigned long int old_number = 0;
assert (base == 10);
assert (endptr == NULL);
while (isdigit (*nptr))
{
number = old_number * 10 + (*(nptr++) - '0');
if ((number <= old_number) && (old_number != 0))
return ULONG_MAX;
old_number = number;
}
return number;
}
#endif
#if !FFEPROJ_BSEARCH
void *
bsearch (const void *key, const void *base, size_t nmemb, size_t size,
int (*compar) (const void *, const void *))
{
size_t i;
int cmp;
/* We do a dumb incremental search, not a binary search, for now. */
for (i = 0; i < nmemb; ++i)
{
if ((cmp = (*compar) (key, base)) == 0)
return base;
if (cmp < 0)
break;
base += size;
}
return NULL;
}
#endif
/* proj.h file for Gnu Fortran
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#ifndef _H_f_proj
#define _H_f_proj
#if !defined (__GNUC__) || (__GNUC__ < 2)
#error "You have to use gcc 2.x to build g77 (might be fixed in g77-0.6)."
#endif
#ifndef BUILT_WITH_270
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
#define BUILT_WITH_270 1
#else
#define BUILT_WITH_270 0
#endif
#endif /* !defined (BUILT_WITH_270) */
/* This file used to attempt to allow for all sorts of broken systems.
Because the auto-configuration scripts in conf-proj(.in) didn't work
on all systems, and I received far too many bug reports about them,
I decided to stop trying to cater to broken systems at all, and
simply remove all but the simplest and most useful code (which is
still in proj.c).
So, if you find your system can't link because bsearch() or strtoul()
aren't found, please just fix your system, or hand-edit the code
below as appropriate. I DO NOT WANT ANY "BUG REPORTS" ABOUT THIS.
g77 requires a working ANSI C environment, and if bsearch() and strtoul()
do not exist, or if <assert.h> isn't found, etc., then you don't have
one, and it is not g77's fault. If it turns out g77 is simply
referring to the wrong system header file -- something I can verify
myself using my copy of the ANSI C standard -- I would like to know
about that. Otherwise, g77 is not the place to fix problems with your
ANSI C implementation, though perhaps gcc might be.
-- burley@gnu.ai.mit.edu 1995-03-24 */
#ifndef FFEPROJ_BSEARCH
#define FFEPROJ_BSEARCH 1 /* 0=>use slow code in proj.c. */
#endif
#ifndef FFEPROJ_STRTOUL
#define FFEPROJ_STRTOUL 1 /* 0=>use untested code in proj.c. */
#endif
/* Include files everyone gets. */
#include "assert.j" /* Use gcc's assert.h. */
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
/* Generally useful definitions. */
typedef enum
{
#if !defined(false) || !defined(true)
false = 0, true = 1,
#endif
#if !defined(FALSE) || !defined(TRUE)
FALSE = 0, TRUE = 1,
#endif
Doggone_Trailing_Comma_Dont_Work = 1
} bool;
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
#define STR(s) # s
#define STRX(s) STR(s)
#ifndef UNUSED /* Compile with -DUNUSED= if cc doesn't support this. */
#if BUILT_WITH_270
#define UNUSED __attribute__ ((unused))
#else /* !BUILT_WITH_270 */
#define UNUSED
#endif /* !BUILT_WITH_270 */
#endif /* !defined (UNUSED) */
#ifndef dmpout
#define dmpout stderr
#endif
#endif
/* rtl.j -- Wrapper for GCC's rtl.h
Copyright (C) 1995 Free Software Foundation, Inc.
Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
This file is part of GNU Fortran.
GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef MAKING_DEPENDENCIES
#ifndef _J_f_rtl
#define _J_f_rtl
#include "config.j"
#include "rtl.h"
#endif
#endif
# Makefile for GNU F77 compiler runtime.
# Copyright (C) 1995-1997 Free Software Foundation, Inc.
# Contributed by Dave Love (d.love@dl.ac.uk).
#
#This file is part of GNU Fortran.
#
#GNU Fortran is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
#
#GNU Fortran is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with GNU Fortran; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#02111-1307, USA.
#### Start of system configuration section. ####
# $(srcdir) must be set to the g77 runtime source directory
# (g77/f/runtime/).
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
INSTALL = @INSTALL@ # installs aren't actually done from here
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
RANLIB = @RANLIB@
RANLIB_TEST = @RANLIB_TEST@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@ @DEFS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
CGFLAGS = -g0
GCC_FOR_TARGET = @CC@
CC = $(GCC_FOR_TARGET)
CROSS = @CROSS@
objext = .o
transform=@program_transform_name@
prefix = @prefix@
exec_prefix = @exec_prefix@
AR = ar
AR_FLAGS = rc
# Directory in which to install scripts.
bindir = $(exec_prefix)/bin
# Directory in which to install library files.
libdir = $(prefix)/lib
# Directory in which to install documentation info files.
infodir = $(prefix)/info
#### End of system configuration section. ####
SHELL = /bin/sh
lib = ../../libf2c.a
SUBDIRS = libI77 libF77 libU77
MISC = libF77/F77_aloc.o libF77/VersionF.o libF77/main.o libF77/s_rnge.o \
libF77/abort_.o libF77/getarg_.o libF77/iargc_.o libF77/getenv_.o \
libF77/signal_.o libF77/s_stop.o libF77/s_paus.o libF77/system_.o \
libF77/cabs.o libF77/derf_.o libF77/derfc_.o libF77/erf_.o \
libF77/erfc_.o libF77/sig_die.o libF77/exit_.o
POW = libF77/pow_ci.o libF77/pow_dd.o libF77/pow_di.o libF77/pow_hh.o \
libF77/pow_ii.o libF77/pow_ri.o libF77/pow_zi.o libF77/pow_zz.o \
libF77/pow_qq.o
CX = libF77/c_abs.o libF77/c_cos.o libF77/c_div.o libF77/c_exp.o \
libF77/c_log.o libF77/c_sin.o libF77/c_sqrt.o
DCX = libF77/z_abs.o libF77/z_cos.o libF77/z_div.o libF77/z_exp.o \
libF77/z_log.o libF77/z_sin.o libF77/z_sqrt.o
REAL = libF77/r_abs.o libF77/r_acos.o libF77/r_asin.o libF77/r_atan.o \
libF77/r_atn2.o libF77/r_cnjg.o libF77/r_cos.o libF77/r_cosh.o \
libF77/r_dim.o libF77/r_exp.o libF77/r_imag.o libF77/r_int.o \
libF77/r_lg10.o libF77/r_log.o libF77/r_mod.o libF77/r_nint.o \
libF77/r_sign.o libF77/r_sin.o libF77/r_sinh.o libF77/r_sqrt.o \
libF77/r_tan.o libF77/r_tanh.o
DBL = libF77/d_abs.o libF77/d_acos.o libF77/d_asin.o libF77/d_atan.o \
libF77/d_atn2.o libF77/d_cnjg.o libF77/d_cos.o libF77/d_cosh.o \
libF77/d_dim.o libF77/d_exp.o libF77/d_imag.o libF77/d_int.o \
libF77/d_lg10.o libF77/d_log.o libF77/d_mod.o libF77/d_nint.o \
libF77/d_prod.o libF77/d_sign.o libF77/d_sin.o libF77/d_sinh.o \
libF77/d_sqrt.o libF77/d_tan.o libF77/d_tanh.o
INT = libF77/i_abs.o libF77/i_dim.o libF77/i_dnnt.o libF77/i_indx.o \
libF77/i_len.o libF77/i_mod.o libF77/i_nint.o libF77/i_sign.o
HALF = libF77/h_abs.o libF77/h_dim.o libF77/h_dnnt.o libF77/h_indx.o \
libF77/h_len.o libF77/h_mod.o libF77/h_nint.o libF77/h_sign.o
CMP = libF77/l_ge.o libF77/l_gt.o libF77/l_le.o libF77/l_lt.o \
libF77/hl_ge.o libF77/hl_gt.o libF77/hl_le.o libF77/hl_lt.o
EFL = libF77/ef1asc_.o libF77/ef1cmc_.o
CHAR = libF77/s_cat.o libF77/s_cmp.o libF77/s_copy.o
F90BIT = libF77/lbitbits.o libF77/lbitshft.o libF77/qbitbits.o \
libF77/qbitshft.o
FOBJ = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) $(HALF) $(CMP) \
$(EFL) $(CHAR) $(F90BIT)
IOBJ = libI77/VersionI.o libI77/backspace.o libI77/close.o libI77/dfe.o \
libI77/dolio.o libI77/due.o libI77/endfile.o libI77/err.o \
libI77/fmt.o libI77/fmtlib.o libI77/iio.o libI77/ilnw.o \
libI77/inquire.o libI77/lread.o libI77/lwrite.o libI77/open.o \
libI77/rdfmt.o libI77/rewind.o libI77/rsfe.o libI77/rsli.o \
libI77/rsne.o libI77/sfe.o libI77/sue.o libI77/typesize.o \
libI77/uio.o libI77/util.o libI77/wref.o libI77/wrtfmt.o \
libI77/wsfe.o libI77/wsle.o libI77/wsne.o libI77/xwsne.o \
libI77/ftell_.o
UOBJ = libU77/VersionU.o libU77/gerror_.o libU77/perror_.o libU77/ierrno_.o \
libU77/itime_.o libU77/time_.o libU77/unlink_.o libU77/fnum_.o \
libU77/getpid_.o libU77/getuid_.o libU77/getgid_.o libU77/kill_.o \
libU77/rand_.o libU77/srand_.o libU77/irand_.o libU77/sleep_.o \
libU77/idate_.o libU77/ctime_.o libU77/etime_.o libU77/dtime_.o \
libU77/isatty_.o libU77/ltime_.o libU77/fstat_.o libU77/stat_.o \
libU77/lstat_.o libU77/access_.o libU77/link_.o libU77/getlog_.o \
libU77/ttynam_.o libU77/getcwd_.o libU77/vxttime_.o \
libU77/vxtidate_.o libU77/gmtime_.o libU77/fdate_.o libU77/secnds_.o \
libU77/bes.o libU77/dbes.o libU77/chdir_.o libU77/chmod_.o \
libU77/lnblnk_.o libU77/hostnm_.o libU77/rename_.o libU77/fgetc_.o \
libU77/fputc_.o libU77/umask_.o libU77/system_clock_.o libU77/date_.o \
libU77/second_.o libU77/flush1_.o libU77/alarm_.o
F2CEXT = abort derf derfc ef1asc ef1cmc erf erfc exit getarg getenv iargc \
signal system flush ftell fseek access besj0 besj1 besjn besy0 besy1 \
besyn chdir chmod ctime date dbesj0 dbesj1 dbesjn dbesy0 dbesy1 dbesyn \
dtime etime fdate fgetc fget flush1 fnum fputc fput fstat gerror \
getcwd getgid getlog getpid getuid gmtime hostnm idate ierrno irand \
isatty itime kill link lnblnk lstat ltime mclock perror rand rename \
secnds second sleep srand stat symlnk sclock time ttynam umask unlink \
vxtidt vxttim alarm
# flags_to_pass to recursive makes & configure (hence the quoting style)
FLAGS_TO_PASS = \
CROSS="$(CROSS)" \
AR_FLAGS="$(AR_FLAGS)" \
AR="$(AR)" \
GCCFLAGS="$(GCCFLAGS)" \
GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
CC="$(GCC_FOR_TARGET)" \
LDFLAGS="$(LDFLAGS)" \
RANLIB="$(RANLIB)" \
RANLIB_TEST="$(RANLIB_TEST)" \
SHELL="$(SHELL)"
CROSS_FLAGS_TO_PASS = \
CROSS="$(CROSS)" \
AR_FLAGS="$(AR_FLAGS)" \
AR="$(AR)" \
GCCFLAGS="$(GCCFLAGS)" \
GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
CC="$(GCC_FOR_TARGET)" \
LDFLAGS="$(LDFLAGS)" \
RANLIB="$(RANLIB)" \
RANLIB_TEST="$(RANLIB_TEST)" \
SHELL="$(SHELL)"
all: ../../include/f2c.h libi77 libf77 libu77 $(lib)
$(lib): stamp-lib ; @true
stamp-lib: $(FOBJ) $(IOBJ) $(UOBJ)
rm -f stamp-lib
$(AR) $(AR_FLAGS) $(lib) $?
for name in $(F2CEXT); \
do \
echo $${name}; \
$(GCC_FOR_TARGET) -c -I. -I$(srcdir) -I../../include $(CPPFLAGS) $(CFLAGS) $(CGFLAGS) \
-DL$${name} $(srcdir)/f2cext.c; \
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
mv f2cext$(objext) L$${name}$(objext); \
$(AR) $(AR_FLAGS) $(lib) L$${name}$(objext); \
rm -f L$${name}$(objext); \
done
if $(RANLIB_TEST); then $(RANLIB) $(lib); \
else true; fi
touch stamp-lib
libi77: libI77/Makefile
if test "$(CROSS)"; then \
cd libI77; $(MAKE) -f Makefile $(CROSS_FLAGS_TO_PASS) all ; \
else \
cd libI77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all ; \
fi
libf77: libF77/Makefile
if test "$(CROSS)"; then \
cd libF77; $(MAKE) -f Makefile $(CROSS_FLAGS_TO_PASS) all ; \
else \
cd libF77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all ; \
fi
libu77: libU77/Makefile
if test "$(CROSS)"; then \
cd libU77; $(MAKE) -f Makefile $(CROSS_FLAGS_TO_PASS) all ; \
else \
cd libU77; $(MAKE) -f Makefile $(FLAGS_TO_PASS) all ; \
fi
${srcdir}/configure: ${srcdir}/configure.in
rm -f config.cache && cd ${srcdir} && autoconf && rm -f config.cache
${srcdir}/libU77/configure: ${srcdir}/libU77/configure.in
rm -f libU77/config.cache && cd ${srcdir}/libU77 && autoconf && rm -f config.cache
#../include/f2c.h libI77/Makefile libF77/Makefile libU77/Makefile Makefile: ${srcdir}/Makefile.in \
# config.status libU77/config.status
# $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status
# cd libU77; $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status
# Extra dependencies for the targets above:
libI77/Makefile: $(srcdir)/libI77/Makefile.in
libF77/Makefile: $(srcdir)/libF77/Makefile.in
libU77/Makefile: $(srcdir)/libU77/Makefile.in
../../include/f2c.h: $(srcdir)/f2c.h.in
#config.status: ${srcdir}/configure
# $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status --recheck
#libU77/config.status: ${srcdir}/libU77/configure
# cd libU77; $(FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) config.status --recheck
mostlyclean:
for i in libI77 libF77 libU77; do cd $$i; $(MAKE) -f Makefile mostlyclean; cd ..; done
clean:
-rm -f config.log config.cache
for i in libI77 libF77 libU77; do cd $$i; $(MAKE) -f Makefile clean; cd ..; done
distclean: clean
-rm -f Makefile lib?77/Makefile config.status libU77/config.status ../../include/f2c.h
maintainer-clean: distclean
-rm -f $(srcdir)/configure $(srcdir)/libU77/configure
uninstall:
rm ../../include/f2c.h
rebuilt: ${srcdir}/configure ${srcdir}/libU77/configure
.PHONY: libf77 libi77 libu77 rebuilt mostlyclean clean distclean maintainer-clean \
uninstall all
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment