Bring in a trimmed down gcc-3.4-20040618.
[dragonfly.git] / contrib / gcc-3.4 / gcc / f / symbol.def
1 /* Definitions and documentations for attributes used in GNU F77 compiler
2    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
3    Contributed by James Craig Burley.
4
5 This file is part of GNU Fortran.
6
7 GNU Fortran is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU Fortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU Fortran; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22 /* "How g77 learns about symbols"
23
24    There are three primary things in a symbol that g77 uses to keep
25    track of what it has learned about that symbol:
26
27    1.  The state
28    2.  The attributes
29    3.  The info
30
31    State, attributes, and info (see f-info* files) all start out with
32    "NONE" fields when a symbol is first created.
33
34    In a PROGRAM or BLOCK DATA program unit, info where cannot be DUMMY
35    or RESULT.  Any combinations including those possibilities are not
36    considered possible in such program units.
37
38    As soon as a symbol is created, it _must_ have its state changed to
39    SEEN, UNCERTAIN, or UNDERSTOOD.
40
41    If SEEN, some info might be set, such as the type info (as in when
42    the TYPE attribute is present) or kind/where info.
43
44    If UNCERTAIN, the permitted combinations of attributes and info are
45    listed below.  Only the attributes ACTUALARG, ADJUSTABLE, ANYLEN, ARRAY,
46    DUMMY, EXTERNAL, SFARG, and TYPE are permitted.  (All these attributes
47    are contrasted to each attribute below, even though some combinations
48    wouldn't be permitted in SEEN state either.)  Note that DUMMY and
49    RESULT are not permitted in a PROGRAM/BLOCKDATA program unit, which
50    results in some of the combinations below not occurring (not UNCERTAIN,
51    but UNDERSTOOD).
52
53    ANYLEN|TYPE & ~(ACTUALARG|ADJUSTABLE|ARRAY|DUMMY|EXTERNAL|SFARG):
54         ENTITY/DUMMY, ENTITY/RESULT, FUNCTION/INTRINSIC.
55
56    ARRAY & ~(ACTUALARG|ANYLEN|DUMMY|EXTERNAL|SFARG|TYPE):
57         ENTITY/DUMMY, ENTITY/LOCAL.
58
59    ARRAY|TYPE & ~(ACTUALARG|ANYLEN|DUMMY|EXTERNAL|SFARG):
60         ENTITY/DUMMY, ENTITY/LOCAL.
61
62    DUMMY & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|EXTERNAL|SFARG|TYPE):
63         ENTITY/DUMMY, FUNCTION/DUMMY, SUBROUTINE/DUMMY.
64
65    DUMMY|TYPE & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|EXTERNAL|SFARG):
66         ENTITY/DUMMY, FUNCTION/DUMMY.
67
68    EXTERNAL & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|DUMMY|SFARG|TYPE):
69         FUNCTION/DUMMY, FUNCTION/GLOBAL, SUBROUTINE/DUMMY,
70         SUBROUTINE/GLOBAL, BLOCKDATA/GLOBAL.
71
72    EXTERNAL|ACTUALARG & ~(ADJUSTABLE|ANYLEN|ARRAY|DUMMY|SFARG|TYPE):
73         FUNCTION/GLOBAL, SUBROUTINE/GLOBAL.
74
75    EXTERNAL|DUMMY & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|SFARG|TYPE):
76         FUNCTION/DUMMY, SUBROUTINE/DUMMY.
77
78    EXTERNAL|TYPE & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|DUMMY|SFARG):
79         FUNCTION/DUMMY, FUNCTION/GLOBAL.
80
81    SFARG & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|DUMMY|EXTERNAL|TYPE):
82         ENTITY/DUMMY, ENTITY/LOCAL.
83
84    SFARG|TYPE & ~(ACTUALARG|ADJUSTABLE|ANYLEN|ARRAY|DUMMY|EXTERNAL):
85         ENTITY/DUMMY, ENTITY/LOCAL.
86
87    TYPE & ~(ACTUALARG|ANYLEN|ARRAY|DUMMY|EXTERNAL|SFARG):
88         ENTITY/DUMMY, ENTITY/LOCAL, ENTITY/RESULT, FUNCTION/DUMMY,
89         FUNCTION/GLOBAL, FUNCTION/INTRINSIC.
90
91    If UNDERSTOOD, the attributes are no longer considered, and the info
92    field is considered to be as fully filled in as possible by analyzing
93    a single program unit.
94
95    Each of the attributes (used only for SEEN/UNCERTAIN states) is
96    defined and described below.  In many cases, a symbol starts out as
97    SEEN and has attributes set as it is seen in various contexts prior
98    to the first executable statement being seen (the "exec transition").
99    Once that happens, either it becomes immediately UNDERSTOOD and all
100    its info filled in, or it becomes UNCERTAIN and its info only partially
101    filled in until it becomes UNDERSTOOD.  While UNCERTAIN, only a
102    subset of attributes are possible/important.
103
104    Not all symbols reach the UNDERSTOOD state, and in some cases symbols
105    go immediately from NONE to the UNDERSTOOD or even UNCERTAIN state.
106    For example, given "PROGRAM FOO", everything is known about the name
107    "FOO", so it becomes immediately UNDERSTOOD.
108
109    Also, there are multiple name spaces, and not all attributes are
110    possible/permitted in all name spaces.
111
112    The only attributes permitted in the global name space are:
113
114    ANY, CBLOCK, SAVECBLOCK.
115
116    The only attributes permitted in the local name space are:
117
118    ANY, ACTUALARG, ADJUSTABLE, ADJUSTS, ANYLEN, ANYSIZE, ARRAY, COMMON,
119    DUMMY, EQUIV, EXTERNAL, INIT, INTRINSIC, NAMELIST, RESULT, SAVE, SFARG,
120    SFUNC, TYPE.
121
122    In the stmt-func name space, no attributes are used, just the states.
123
124 */
125
126 \f
127 /* Actual argument.  Always accompanied by EXTERNAL.
128
129    Context is a name used as an actual argument passed to a procedure
130    other than a statement function.
131
132    Valid in UNCERTAIN state and local name space only.
133
134    This attribute is used only to flag the fact that an EXTERNAL'ed name
135    has been seen as an actual argument, and therefore cannot be
136    discovered later to be a DUMMY argument (via an ENTRY statement).
137
138    If DUMMY + EXTERNAL already, it is permitted to see the name
139    as an actual argument, but ACTUALARG is not added as an attribute since
140    that fact does not improve knowledge about the name.  Hence it is not
141    permitted to transition ACTUALARG + EXTERNAL += DUMMY, and the
142    transition DUMMY + EXTERNAL += ACTUALARG is not actually done.
143
144    Cannot be combined with: ANYLEN, ARRAY, DUMMY, SFARG, TYPE.
145
146    Can be combined with: ACTUALARG, ANY, EXTERNAL.
147
148    Unrelated: ADJUSTABLE, ADJUSTS, ANYSIZE, CBLOCK, COMMON, EQUIV, INIT,
149    INTRINSIC, NAMELIST, RESULT, SAVE, SAVECBLOCK, SFUNC.
150
151 */
152
153 DEFATTR (FFESYMBOL_attrACTUALARG, FFESYMBOL_attrsACTUALARG, "ACTUALARG")
154 #ifndef FFESYMBOL_attrsACTUALARG
155 #define FFESYMBOL_attrsACTUALARG ((ffesymbolAttrs) 1 << FFESYMBOL_attrACTUALARG)
156 #endif
157 \f
158 /* Has adjustable dimension(s).  Always accompanied by ARRAY.
159
160    Context is an ARRAY-attributed name with an adjustable dimension (at
161    least one dimension containing a variable reference).
162
163    Valid in SEEN state and local name space only.
164
165    Cannot be combined with: ADJUSTABLE, ADJUSTS, COMMON, EQUIV, EXTERNAL,
166    NAMELIST, INIT, INTRINSIC, RESULT, SAVE, SFARG, SFUNC.
167
168    Can be combined with: ANY, ANYLEN, ANYSIZE, ARRAY, TYPE.
169
170    Must be combined with: DUMMY.
171
172    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
173
174 */
175
176 DEFATTR (FFESYMBOL_attrADJUSTABLE, FFESYMBOL_attrsADJUSTABLE, "ADJUSTABLE")
177 #ifndef FFESYMBOL_attrsADJUSTABLE
178 #define FFESYMBOL_attrsADJUSTABLE ((ffesymbolAttrs) 1 << FFESYMBOL_attrADJUSTABLE)
179 #endif
180 \f
181 /* Adjusts an array.
182
183    Context is an expression in an array declarator, such as in a
184    DIMENSION, COMMON, or type-specification statement.
185
186    Valid in SEEN state and local name space only.
187
188    Cannot be combined with: ADJUSTABLE, ANYLEN, ANYSIZE, ARRAY,
189    EXTERNAL, INTRINSIC, RESULT, SAVE, SFUNC.
190
191    Can be combined with: ADJUSTS, ANY, COMMON, DUMMY, EQUIV, INIT,
192    NAMELIST, SFARG, TYPE.
193
194    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
195
196 */
197
198 DEFATTR (FFESYMBOL_attrADJUSTS, FFESYMBOL_attrsADJUSTS, "ADJUSTS")
199 #ifndef FFESYMBOL_attrsADJUSTS
200 #define FFESYMBOL_attrsADJUSTS ((ffesymbolAttrs) 1 << FFESYMBOL_attrADJUSTS)
201 #endif
202 \f
203 /* Can be anything now, diagnostic has been issued at least once.
204
205    Valid in UNDERSTOOD state only.  Valid in any name space.
206
207    Can be combined with anything.
208
209 */
210
211 DEFATTR (FFESYMBOL_attrANY, FFESYMBOL_attrsANY, "ANY")
212 #ifndef FFESYMBOL_attrsANY
213 #define FFESYMBOL_attrsANY ((ffesymbolAttrs) 1 << FFESYMBOL_attrANY)
214 #endif
215 \f
216 /* Assumed (any) length.  Always accompanied by TYPE.
217
218    Context is a name listed in a CHARACTER statement and given a length
219    specification of (*).
220
221    Valid in SEEN and UNCERTAIN states.  Valid in local name space only.
222
223    In SEEN state, attributes marked below with "=" are unrelated.
224
225    In UNCERTAIN state, attributes marked below with "+" are unrelated,
226    attributes marked below with "-" cannot be combined with ANYLEN,
227    and attributes marked below with "!" transition to state UNDERSTOOD
228    instead of acquiring the new attribute.  Any other subsequent mentioning
229    of the name transitions to state UNDERSTOOD.  UNCERTAIN state is not
230    valid for this attribute in PROGRAM/BLOCKDATA program unit.
231
232    Cannot be combined with: ACTUALARG=, ADJUSTS+, ANYLEN, COMMON+, EQUIV+,
233    EXTERNAL, INIT+, INTRINSIC+, NAMELIST+, SAVE+, SFARG, SFUNC+.
234
235    Can be combined with: ADJUSTABLE+, ANY, ANYSIZE+, ARRAY-, DUMMY!, RESULT+,
236    TYPE.
237
238    Unrelated: CBLOCK, SAVECBLOCK.
239
240    In PROGRAM/BLOCKDATA, cannot be combined with ARRAY.
241
242 */
243
244 DEFATTR (FFESYMBOL_attrANYLEN, FFESYMBOL_attrsANYLEN, "ANYLEN")
245 #ifndef FFESYMBOL_attrsANYLEN
246 #define FFESYMBOL_attrsANYLEN ((ffesymbolAttrs) 1 << FFESYMBOL_attrANYLEN)
247 #endif
248 \f
249 /* Has assumed (any) size.  Always accompanied by ARRAY.
250
251    Context is an ARRAY-attributed name with its last dimension having
252    an upper bound of "*".
253
254    Valid in SEEN state and local name space only.
255
256    Cannot be combined with: ADJUSTS, ANYSIZE, COMMON, EQUIV, EXTERNAL,
257    NAMELIST, INIT, INTRINSIC, RESULT, SAVE, SFARG, SFUNC.
258
259    Can be combined with: ADJUSTABLE, ANY, ANYLEN, ARRAY, TYPE.
260
261    Must be combined with: DUMMY.
262
263    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
264
265 */
266
267 DEFATTR (FFESYMBOL_attrANYSIZE, FFESYMBOL_attrsANYSIZE, "ANYSIZE")
268 #ifndef FFESYMBOL_attrsANYSIZE
269 #define FFESYMBOL_attrsANYSIZE ((ffesymbolAttrs) 1 << FFESYMBOL_attrANYSIZE)
270 #endif
271 \f
272 /* Array.
273
274    Context is a name followed by an array declarator, such as in a
275    type-statement-decl, a DIMENSION statement, or a COMMON statement.
276
277    Valid in SEEN and UNCERTAIN states.  Valid in local name space only.
278
279    In SEEN state, attributes marked below with "=" are unrelated.
280
281    In UNCERTAIN state, attributes marked below with "+" are unrelated,
282    attributes marked below with "-" cannot be combined with ARRAY,
283    and attributes marked below with "!" transition to state UNDERSTOOD
284    instead of acquiring the new attribute.  Any other subsequent mentioning
285    of the name transitions to state UNDERSTOOD.  UNCERTAIN state is not
286    valid for this attribute in PROGRAM/BLOCKDATA program unit.
287
288    Cannot be combined with: ACTUALARG=, ADJUSTS+, ARRAY, EXTERNAL,
289    INTRINSIC+, RESULT+, SFARG, SFUNC+.
290
291    Can be combined with: ADJUSTABLE+, ANY, ANYLEN-, ANYSIZE+, COMMON+,
292    DUMMY!, EQUIV+, INIT+, NAMELIST+, SAVE+, TYPE.
293
294    Unrelated: CBLOCK, SAVECBLOCK.
295
296    In PROGRAM/BLOCKDATA, cannot be combined with ANYLEN.
297    Cannot follow INIT.
298
299 */
300
301 DEFATTR (FFESYMBOL_attrARRAY, FFESYMBOL_attrsARRAY, "ARRAY")
302 #ifndef FFESYMBOL_attrsARRAY
303 #define FFESYMBOL_attrsARRAY ((ffesymbolAttrs) 1 << FFESYMBOL_attrARRAY)
304 #endif
305 \f
306 /* COMMON block.
307
308    Context is a name enclosed in slashes in a COMMON statement.
309
310    Valid in SEEN state and global name space only.
311
312    Cannot be combined with:
313
314    Can be combined with: CBLOCK, SAVECBLOCK.
315
316    Unrelated: ACTUALARG, ADJUSTABLE, ADJUSTS, ANY, ANYLEN, ANYSIZE,
317    ARRAY, COMMON, DUMMY, EQUIV, EXTERNAL, INIT, INTRINSIC, NAMELIST,
318    RESULT, SAVE, SFARG, SFUNC, TYPE.
319
320 */
321
322 DEFATTR (FFESYMBOL_attrCBLOCK, FFESYMBOL_attrsCBLOCK, "CBLOCK")
323 #ifndef FFESYMBOL_attrsCBLOCK
324 #define FFESYMBOL_attrsCBLOCK ((ffesymbolAttrs) 1 << FFESYMBOL_attrCBLOCK)
325 #endif
326 \f
327 /* Placed in COMMON.
328
329    Context is a name listed in a COMMON statement but not enclosed in
330    slashes.
331
332    Valid in SEEN state and local name space only.
333
334    Cannot be combined with: ADJUSTABLE, ANYLEN, ANYSIZE, COMMON, DUMMY,
335    EXTERNAL, INTRINSIC, RESULT, SAVE, SFUNC.
336
337    Can be combined with: ADJUSTS, ANY, ARRAY, EQUIV, INIT, NAMELIST,
338    SFARG, TYPE.
339
340    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
341
342 */
343
344 DEFATTR (FFESYMBOL_attrCOMMON, FFESYMBOL_attrsCOMMON, "COMMON")
345 #ifndef FFESYMBOL_attrsCOMMON
346 #define FFESYMBOL_attrsCOMMON ((ffesymbolAttrs) 1 << FFESYMBOL_attrCOMMON)
347 #endif
348 \f
349 /* Dummy argument.
350
351    Context is a name listed in the arglist of FUNCTION, SUBROUTINE, ENTRY.
352    (Statement-function definitions have dummy arguments, but since they're
353    the only possible entities in the statement-function name space, this
354    attribution mechanism isn't used for them.)
355
356    Valid in SEEN and UNCERTAIN states.  Valid in local name space only.
357
358    In SEEN state, attributes marked below with "=" are unrelated.
359
360    In UNCERTAIN state, attributes marked below with "+" are unrelated,
361    attributes marked below with "-" cannot be combined with DUMMY,
362    and attributes marked below with "!" transition to state UNDERSTOOD
363    instead of acquiring the new attribute.  Any other subsequent mentioning
364    of the name transitions to state UNDERSTOOD.  UNCERTAIN state is not
365    valid for this attribute in PROGRAM/BLOCKDATA program unit.
366
367    Cannot be combined with: ACTUALARG=, COMMON+, EQUIV+, INIT+, INTRINSIC+,
368    NAMELIST+, RESULT+, SAVE+, SFUNC+.
369
370    Can be combined with: ADJUSTABLE+, ADJUSTS+, ANY, ANYLEN-, ANYSIZE+,
371    ARRAY-, DUMMY, EXTERNAL, SFARG-, TYPE.
372
373    Unrelated: CBLOCK, SAVECBLOCK.
374
375    VXT Fortran disallows DUMMY + NAMELIST.
376    F90 allows DUMMY + NAMELIST (with some restrictions), g77 doesn't yet.
377
378 */
379
380 DEFATTR (FFESYMBOL_attrDUMMY, FFESYMBOL_attrsDUMMY, "DUMMY")
381 #ifndef FFESYMBOL_attrsDUMMY
382 #define FFESYMBOL_attrsDUMMY ((ffesymbolAttrs) 1 << FFESYMBOL_attrDUMMY)
383 #endif
384 \f
385 /* EQUIVALENCE'd.
386
387    Context is a name given in an EQUIVALENCE statement.
388
389    Valid in SEEN state and local name space only.
390
391    Cannot be combined with: ADJUSTABLE, ANYLEN, ANYSIZE, DUMMY,
392    EXTERNAL, INTRINSIC, RESULT, SFUNC.
393
394    Can be combined with: ADJUSTS, ANY, ARRAY, COMMON, EQUIV, INIT,
395    NAMELIST, SAVE, SFARG, TYPE.
396
397    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
398
399 */
400
401 DEFATTR (FFESYMBOL_attrEQUIV, FFESYMBOL_attrsEQUIV, "EQUIV")
402 #ifndef FFESYMBOL_attrsEQUIV
403 #define FFESYMBOL_attrsEQUIV ((ffesymbolAttrs) 1 << FFESYMBOL_attrEQUIV)
404 #endif
405 \f
406 /* EXTERNAL.
407
408    Context is a name listed in an EXTERNAL statement.
409
410    Valid in SEEN and UNCERTAIN states.  Valid in local name space only.
411
412    In SEEN state, attributes marked below with "=" are unrelated.
413
414    In UNCERTAIN state, attributes marked below with "+" are unrelated,
415    attributes marked below with "-" cannot be combined with EXTERNAL,
416    and attributes marked below with "!" transition to state UNDERSTOOD
417    instead of acquiring the new attribute.  Many other subsequent mentionings
418    of the name transitions to state UNDERSTOOD.  UNCERTAIN state is not
419    valid for this attribute in PROGRAM/BLOCKDATA program unit.
420
421    Cannot be combined with: ADJUSTABLE+, ADJUSTS+, ANYLEN, ANYSIZE+,
422    ARRAY, COMMON+, EQUIV+, EXTERNAL, INIT+, INTRINSIC+, NAMELIST+, RESULT+,
423    SAVE+, SFARG, SFUNC+.
424
425    Can be combined with: ACTUALARG=, ANY, DUMMY, TYPE.
426
427    Unrelated: CBLOCK, SAVECBLOCK.
428
429 */
430
431 DEFATTR (FFESYMBOL_attrEXTERNAL, FFESYMBOL_attrsEXTERNAL, "EXTERNAL")
432 #ifndef FFESYMBOL_attrsEXTERNAL
433 #define FFESYMBOL_attrsEXTERNAL ((ffesymbolAttrs) 1 << FFESYMBOL_attrEXTERNAL)
434 #endif
435 \f
436 /* Given an initial value.
437
438    Context is a name listed in a type-def-stmt such as INTEGER or REAL
439    and given an initial value or values.  Someday will also include
440    names in DATA statements, which currently immediately exec-transition
441    their targets.
442
443    Valid in SEEN state and local name space only.
444
445    Cannot be combined with: ADJUSTABLE, ANYLEN, ANYSIZE, DUMMY, EXTERNAL,
446    INIT, INTRINSIC, RESULT, SFUNC.
447
448    Can be combined with: ADJUSTS, ANY, ARRAY, COMMON, EQUIV, NAMELIST,
449    SAVE, SFARG, TYPE.
450
451    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
452
453    Cannot be followed by ARRAY.
454
455 */
456
457 DEFATTR (FFESYMBOL_attrINIT, FFESYMBOL_attrsINIT, "INIT")
458 #ifndef FFESYMBOL_attrsINIT
459 #define FFESYMBOL_attrsINIT ((ffesymbolAttrs) 1 << FFESYMBOL_attrINIT)
460 #endif
461 \f
462 /* INTRINSIC.
463
464    Context is a name listed in an INTRINSIC statement.
465
466    Valid in SEEN state and local name space only.
467
468    Cannot be combined with: ADJUSTABLE, ADJUSTS, ANYLEN, ANYSIZE, ARRAY,
469    COMMON, DUMMY, EQUIV, EXTERNAL, INIT, INTRINSIC, NAMELIST, RESULT,
470    SAVE, SFARG, SFUNC.
471
472    Can be combined with: ANY, TYPE.
473
474    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
475
476 */
477
478 DEFATTR (FFESYMBOL_attrINTRINSIC, FFESYMBOL_attrsINTRINSIC, "INTRINSIC")
479 #ifndef FFESYMBOL_attrsINTRINSIC
480 #define FFESYMBOL_attrsINTRINSIC ((ffesymbolAttrs) 1 << FFESYMBOL_attrINTRINSIC)
481 #endif
482 \f
483 /* NAMELISTed.
484
485    Context is a name listed in a NAMELIST statement but not enclosed in
486    slashes.
487
488    Valid in SEEN state and local name space only.
489
490    Cannot be combined with: ADJUSTABLE, ANYLEN, ANYSIZE, DUMMY, EXTERNAL,
491    INTRINSIC, RESULT, SFUNC.
492
493    Can be combined with: ADJUSTS, ANY, ARRAY, COMMON, EQUIV, INIT,
494    NAMELIST, SAVE, SFARG, TYPE.
495
496    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
497
498 */
499
500 DEFATTR (FFESYMBOL_attrNAMELIST, FFESYMBOL_attrsNAMELIST, "NAMELIST")
501 #ifndef FFESYMBOL_attrsNAMELIST
502 #define FFESYMBOL_attrsNAMELIST ((ffesymbolAttrs) 1 << FFESYMBOL_attrNAMELIST)
503 #endif
504 \f
505 /* RESULT of a function.
506
507    Context is name in RESULT() clause in FUNCTION or ENTRY statement, or
508    the name in a FUNCTION or ENTRY statement (within a FUNCTION subprogram)
509    that has no RESULT() clause.
510
511    Valid in SEEN state and local name space only.
512
513    Cannot be combined with: ADJUSTABLE, ADJUSTS, ANYSIZE, ARRAY, COMMON,
514    DUMMY, EQUIV, EXTERNAL, INIT, INTRINSIC, NAMELIST, RESULT, SAVE, SFUNC.
515
516    Can be combined with: ANY, ANYLEN, SFARG, TYPE.
517
518    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
519
520    Cannot be preceded by SFARG.
521
522 */
523
524 DEFATTR (FFESYMBOL_attrRESULT, FFESYMBOL_attrsRESULT, "RESULT")
525 #ifndef FFESYMBOL_attrsRESULT
526 #define FFESYMBOL_attrsRESULT ((ffesymbolAttrs) 1 << FFESYMBOL_attrRESULT)
527 #endif
528 \f
529 /* SAVEd (not enclosed in slashes).
530
531    Context is a name listed in a SAVE statement but not enclosed in slashes.
532
533    Valid in SEEN state and local name space only.
534
535    Cannot be combined with: ADUSTABLE, ADJUSTS, ANYLEN, ANYSIZE, COMMON,
536    DUMMY, EXTERNAL, INTRINSIC, RESULT, SAVE, SFUNC.
537
538    Can be combined with: ANY, ARRAY, EQUIV, INIT, NAMELIST,
539    SFARG, TYPE.
540
541    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
542
543 */
544
545 DEFATTR (FFESYMBOL_attrSAVE, FFESYMBOL_attrsSAVE, "SAVE")
546 #ifndef FFESYMBOL_attrsSAVE
547 #define FFESYMBOL_attrsSAVE ((ffesymbolAttrs) 1 << FFESYMBOL_attrSAVE)
548 #endif
549 \f
550 /* SAVEd (enclosed in slashes).
551
552    Context is a name enclosed in slashes in a SAVE statement.
553
554    Valid in SEEN state and global name space only.
555
556    Cannot be combined with: SAVECBLOCK.
557
558    Can be combined with: CBLOCK.
559
560    Unrelated: ACTUALARG, ADJUSTABLE, ADJUSTS, ANY, ANYLEN, ANYSIZE,
561    ARRAY, COMMON, DUMMY, EQUIV, EXTERNAL, INIT, INTRINSIC, NAMELIST,
562    RESULT, SAVE, SFARG, SFUNC, TYPE.
563
564 */
565
566 DEFATTR (FFESYMBOL_attrSAVECBLOCK, FFESYMBOL_attrsSAVECBLOCK, "SAVECBLOCK")
567 #ifndef FFESYMBOL_attrsSAVECBLOCK
568 #define FFESYMBOL_attrsSAVECBLOCK ((ffesymbolAttrs) 1 << FFESYMBOL_attrSAVECBLOCK)
569 #endif
570 \f
571 /* Name used as a statement function arg or DATA implied-DO iterator.
572
573    Context is a name listed in the arglist of statement-function-definition
574    or as the iterator in an implied-DO construct in a DATA statement.
575
576    Valid in SEEN and UNCERTAIN states.  Valid in local name space only.
577
578    In SEEN state, attributes marked below with "=" are unrelated.
579
580    In UNCERTAIN state, attributes marked below with "+" are unrelated,
581    attributes marked below with "-" cannot be combined with SFARG,
582    and attributes marked below with "!" transition to state UNDERSTOOD
583    instead of acquiring the new attribute.  Any other subsequent mentioning
584    of the name transitions to state UNDERSTOOD.  UNCERTAIN state is not
585    valid for this attribute in PROGRAM/BLOCKDATA program unit.
586
587    Cannot be combined with: ACTUALARG=, ADJUSTABLE+, ANYLEN, ANYSIZE+,
588    ARRAY, EXTERNAL, INTRINSIC+, SFUNC+.
589
590    Can be combined with: ADJUSTS+, ANY, COMMON+, DUMMY!, EQUIV+, INIT+,
591    NAMELIST+, RESULT+, SAVE+, SFARG, TYPE.
592
593    Unrelated: CBLOCK, SAVECBLOCK.
594
595    Cannot be followed by RESULT.
596
597 */
598
599 DEFATTR (FFESYMBOL_attrSFARG, FFESYMBOL_attrsSFARG, "SFARG")
600 #ifndef FFESYMBOL_attrsSFARG
601 #define FFESYMBOL_attrsSFARG ((ffesymbolAttrs) 1 << FFESYMBOL_attrSFARG)
602 #endif
603 \f
604 /* Statement function name.
605
606    Context is a statement-function-definition statement, the name being
607    defined.
608
609    Valid in SEEN state and local name space only.
610
611    Cannot be combined with: ADJUSTABLE, ADJUSTS, ANYLEN, ANYSIZE, ARRAY,
612    COMMON, DUMMY, EQUIV, EXTERNAL, INIT, INTRINSIC, NAMELIST, RESULT,
613    SAVE, SFARG, SFUNC.
614
615    Can be combined with: ANY, TYPE.
616
617    Unrelated: ACTUALARG, CBLOCK, SAVECBLOCK.
618
619 */
620
621 DEFATTR (FFESYMBOL_attrSFUNC, FFESYMBOL_attrsSFUNC, "SFUNC")
622 #ifndef FFESYMBOL_attrsSFUNC
623 #define FFESYMBOL_attrsSFUNC ((ffesymbolAttrs) 1 << FFESYMBOL_attrSFUNC)
624 #endif
625 \f
626 /* Explicitly typed.
627
628    Context is a name listed in a type-def-stmt such as INTEGER or REAL.
629
630    Valid in SEEN and UNCERTAIN states.  Valid in local name space only.
631
632    In SEEN state, attributes marked below with "=" are unrelated.
633
634    In UNCERTAIN state, attributes marked below with "+" are unrelated,
635    attributes marked below with "-" cannot be combined with TYPE,
636    and attributes marked below with "!" transition to state UNDERSTOOD
637    instead of acquiring the new attribute.  Many other subsequent mentionings
638    of the name transitions to state UNDERSTOOD.  UNCERTAIN state is not
639    valid for this attribute in PROGRAM/BLOCKDATA program unit.
640
641    Cannot be combined with: ACTUALARG=, TYPE.
642
643    Can be combined with: ADJUSTABLE+, ADJUSTS+, ANY, ANYLEN, ANYSIZE+,
644    ARRAY, COMMON+, DUMMY, EQUIV+, EXTERNAL, INIT+, INTRINSIC+, NAMELIST+,
645    RESULT+, SAVE+, SFARG, SFUNC+.
646
647    Unrelated: CBLOCK, SAVECBLOCK.
648
649 */
650
651 DEFATTR (FFESYMBOL_attrTYPE, FFESYMBOL_attrsTYPE, "TYPE")
652 #ifndef FFESYMBOL_attrsTYPE
653 #define FFESYMBOL_attrsTYPE ((ffesymbolAttrs) 1 << FFESYMBOL_attrTYPE)
654 #endif