Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / contrib / gcc / print-tree.c
1 /* Prints out tree in human readable form - GNU C-compiler
2    Copyright (C) 1990, 91, 93-97, 1998 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING.  If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 /* $FreeBSD: src/contrib/gcc/print-tree.c,v 1.4 1999/10/26 09:17:58 obrien Exp $ */
22 /* $DragonFly: src/contrib/gcc/Attic/print-tree.c,v 1.2 2003/06/17 04:24:01 dillon Exp $ */
23
24
25 #include "config.h"
26 #include "system.h"
27 #include "tree.h"
28
29 extern char *mode_name[];
30
31 void print_node ();
32 void indent_to ();
33
34 /* Define the hash table of nodes already seen.
35    Such nodes are not repeated; brief cross-references are used.  */
36
37 #define HASH_SIZE 37
38
39 struct bucket
40 {
41   tree node;
42   struct bucket *next;
43 };
44
45 static struct bucket **table;
46
47 /* Print the node NODE on standard error, for debugging.
48    Most nodes referred to by this one are printed recursively
49    down to a depth of six.  */
50
51 void
52 debug_tree (node)
53      tree node;
54 {
55   char *object = (char *) oballoc (0);
56
57   table = (struct bucket **) oballoc (HASH_SIZE * sizeof (struct bucket *));
58   bzero ((char *) table, HASH_SIZE * sizeof (struct bucket *));
59   print_node (stderr, "", node, 0);
60   table = 0;
61   obfree (object);
62   fprintf (stderr, "\n");
63 }
64
65 /* Print a node in brief fashion, with just the code, address and name.  */
66
67 void
68 print_node_brief (file, prefix, node, indent)
69      FILE *file;
70      const char *prefix;
71      tree node;
72      int indent;
73 {
74   char class;
75
76   if (node == 0)
77     return;
78
79   class = TREE_CODE_CLASS (TREE_CODE (node));
80
81   /* Always print the slot this node is in, and its code, address and
82      name if any.  */
83   if (indent > 0)
84     fprintf (file, " ");
85   fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
86   fprintf (file, HOST_PTR_PRINTF, (char *) node);
87
88   if (class == 'd')
89     {
90       if (DECL_NAME (node))
91         fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
92     }
93   else if (class == 't')
94     {
95       if (TYPE_NAME (node))
96         {
97           if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
98             fprintf (file, " %s", IDENTIFIER_POINTER (TYPE_NAME (node)));
99           else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
100                    && DECL_NAME (TYPE_NAME (node)))
101             fprintf (file, " %s",
102                      IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))));
103         }
104     }
105   if (TREE_CODE (node) == IDENTIFIER_NODE)
106     fprintf (file, " %s", IDENTIFIER_POINTER (node));
107   /* We might as well always print the value of an integer.  */
108   if (TREE_CODE (node) == INTEGER_CST)
109     {
110       if (TREE_CONSTANT_OVERFLOW (node))
111         fprintf (file, " overflow");
112
113       fprintf (file, " ");
114       if (TREE_INT_CST_HIGH (node) == 0)
115         fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED, TREE_INT_CST_LOW (node));
116       else if (TREE_INT_CST_HIGH (node) == -1
117                && TREE_INT_CST_LOW (node) != 0)
118         {
119           fprintf (file, "-");
120           fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED,
121                  -TREE_INT_CST_LOW (node));
122         }
123       else
124         fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
125                  TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
126     }
127   if (TREE_CODE (node) == REAL_CST)
128     {
129       REAL_VALUE_TYPE d;
130
131       if (TREE_OVERFLOW (node))
132         fprintf (file, " overflow");
133
134 #if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC)
135       d = TREE_REAL_CST (node);
136       if (REAL_VALUE_ISINF (d))
137         fprintf (file, " Inf");
138       else if (REAL_VALUE_ISNAN (d))
139         fprintf (file, " Nan");
140       else
141         {
142           char string[100];
143
144           REAL_VALUE_TO_DECIMAL (d, "%e", string);
145           fprintf (file, " %s", string);
146         }
147 #else
148       {
149         int i;
150         unsigned char *p = (unsigned char *) &TREE_REAL_CST (node);
151         fprintf (file, " 0x");
152         for (i = 0; i < sizeof TREE_REAL_CST (node); i++)
153           fprintf (file, "%02x", *p++);
154         fprintf (file, "");
155       }
156 #endif
157     }
158
159   fprintf (file, ">");
160 }
161
162 void
163 indent_to (file, column)
164      FILE *file;
165      int column;
166 {
167   int i;
168
169   /* Since this is the long way, indent to desired column.  */
170   if (column > 0)
171     fprintf (file, "\n");
172   for (i = 0; i < column; i++)
173     fprintf (file, " ");
174 }
175 \f
176 /* Print the node NODE in full on file FILE, preceded by PREFIX,
177    starting in column INDENT.  */
178
179 void
180 print_node (file, prefix, node, indent)
181      FILE *file;
182      const char *prefix;
183      tree node;
184      int indent;
185 {
186   int hash;
187   struct bucket *b;
188   enum machine_mode mode;
189   char class;
190   int len;
191   int first_rtl;
192   int i;
193
194   if (node == 0)
195     return;
196
197   class = TREE_CODE_CLASS (TREE_CODE (node));
198
199   /* Don't get too deep in nesting.  If the user wants to see deeper,
200      it is easy to use the address of a lowest-level node
201      as an argument in another call to debug_tree.  */
202
203   if (indent > 24)
204     {
205       print_node_brief (file, prefix, node, indent);
206       return;
207     }
208
209   if (indent > 8 && (class == 't' || class == 'd'))
210     {
211       print_node_brief (file, prefix, node, indent);
212       return;
213     }
214
215   /* It is unsafe to look at any other filds of an ERROR_MARK node.  */
216   if (TREE_CODE (node) == ERROR_MARK)
217     {
218       print_node_brief (file, prefix, node, indent);
219       return;
220     }
221
222   hash = ((unsigned long) node) % HASH_SIZE;
223
224   /* If node is in the table, just mention its address.  */
225   for (b = table[hash]; b; b = b->next)
226     if (b->node == node)
227       {
228         print_node_brief (file, prefix, node, indent);
229         return;
230       }
231
232   /* Add this node to the table.  */
233   b = (struct bucket *) oballoc (sizeof (struct bucket));
234   b->node = node;
235   b->next = table[hash];
236   table[hash] = b;
237
238   /* Indent to the specified column, since this is the long form.  */
239   indent_to (file, indent);
240
241   /* Print the slot this node is in, and its code, and address.  */
242   fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
243   fprintf (file, HOST_PTR_PRINTF, (char *) node);
244
245   /* Print the name, if any.  */
246   if (class == 'd')
247     {
248       if (DECL_NAME (node))
249         fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
250     }
251   else if (class == 't')
252     {
253       if (TYPE_NAME (node))
254         {
255           if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
256             fprintf (file, " %s", IDENTIFIER_POINTER (TYPE_NAME (node)));
257           else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
258                    && DECL_NAME (TYPE_NAME (node)))
259             fprintf (file, " %s",
260                      IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))));
261         }
262     }
263   if (TREE_CODE (node) == IDENTIFIER_NODE)
264     fprintf (file, " %s", IDENTIFIER_POINTER (node));
265
266   if (TREE_CODE (node) == INTEGER_CST)
267     {
268       if (indent <= 4)
269         print_node_brief (file, "type", TREE_TYPE (node), indent + 4);
270     }
271   else
272     {
273       print_node (file, "type", TREE_TYPE (node), indent + 4);
274       if (TREE_TYPE (node))
275         indent_to (file, indent + 3);
276
277       print_obstack_name ((char *) node, file, "");
278       indent_to (file, indent + 3);
279     }
280
281   /* If a permanent object is in the wrong obstack, or the reverse, warn.  */
282   if (object_permanent_p (node) != TREE_PERMANENT (node))
283     {
284       if (TREE_PERMANENT (node))
285         fputs (" !!permanent object in non-permanent obstack!!", file);
286       else
287         fputs (" !!non-permanent object in permanent obstack!!", file);
288       indent_to (file, indent + 3);
289     }
290
291   if (TREE_SIDE_EFFECTS (node))
292     fputs (" side-effects", file);
293   if (TREE_READONLY (node))
294     fputs (" readonly", file);
295   if (TREE_CONSTANT (node))
296     fputs (" constant", file);
297   if (TREE_ADDRESSABLE (node))
298     fputs (" addressable", file);
299   if (TREE_THIS_VOLATILE (node))
300     fputs (" volatile", file);
301   if (TREE_UNSIGNED (node))
302     fputs (" unsigned", file);
303   if (TREE_ASM_WRITTEN (node))
304     fputs (" asm_written", file);
305   if (TREE_USED (node))
306     fputs (" used", file);
307   if (TREE_RAISES (node))
308     fputs (" raises", file);
309   if (TREE_PERMANENT (node))
310     fputs (" permanent", file);
311   if (TREE_PUBLIC (node))
312     fputs (" public", file);
313   if (TREE_STATIC (node))
314     fputs (" static", file);
315   if (TREE_LANG_FLAG_0 (node))
316     fputs (" tree_0", file);
317   if (TREE_LANG_FLAG_1 (node))
318     fputs (" tree_1", file);
319   if (TREE_LANG_FLAG_2 (node))
320     fputs (" tree_2", file);
321   if (TREE_LANG_FLAG_3 (node))
322     fputs (" tree_3", file);
323   if (TREE_LANG_FLAG_4 (node))
324     fputs (" tree_4", file);
325   if (TREE_LANG_FLAG_5 (node))
326     fputs (" tree_5", file);
327   if (TREE_LANG_FLAG_6 (node))
328     fputs (" tree_6", file);
329
330   /* DECL_ nodes have additional attributes.  */
331
332   switch (TREE_CODE_CLASS (TREE_CODE (node)))
333     {
334     case 'd':
335       mode = DECL_MODE (node);
336
337       if (DECL_IGNORED_P (node))
338         fputs (" ignored", file);
339       if (DECL_ABSTRACT (node))
340         fputs (" abstract", file);
341       if (DECL_IN_SYSTEM_HEADER (node))
342         fputs (" in_system_header", file);
343       if (DECL_COMMON (node))
344         fputs (" common", file);
345       if (DECL_EXTERNAL (node))
346         fputs (" external", file);
347       if (DECL_REGISTER (node))
348         fputs (" regdecl", file);
349       if (DECL_PACKED (node))
350         fputs (" packed", file);
351       if (DECL_NONLOCAL (node))
352         fputs (" nonlocal", file);
353       if (DECL_INLINE (node))
354         fputs (" inline", file);
355
356       if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node))
357         fputs (" suppress-debug", file);
358
359       if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node))
360         fputs (" built-in", file);
361       if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN_NONANSI (node))
362         fputs (" built-in-nonansi", file);
363
364       if (TREE_CODE (node) == FIELD_DECL && DECL_BIT_FIELD (node))
365         fputs (" bit-field", file);
366       if (TREE_CODE (node) == LABEL_DECL && DECL_TOO_LATE (node))
367         fputs (" too-late", file);
368       if (TREE_CODE (node) == VAR_DECL && DECL_IN_TEXT_SECTION (node))
369         fputs (" in-text-section", file);
370
371       if (DECL_VIRTUAL_P (node))
372         fputs (" virtual", file);
373       if (DECL_DEFER_OUTPUT (node))
374         fputs (" defer-output", file);
375       if (DECL_TRANSPARENT_UNION (node))
376         fputs (" transparent-union", file);
377
378       if (DECL_LANG_FLAG_0 (node))
379         fputs (" decl_0", file);
380       if (DECL_LANG_FLAG_1 (node))
381         fputs (" decl_1", file);
382       if (DECL_LANG_FLAG_2 (node))
383         fputs (" decl_2", file);
384       if (DECL_LANG_FLAG_3 (node))
385         fputs (" decl_3", file);
386       if (DECL_LANG_FLAG_4 (node))
387         fputs (" decl_4", file);
388       if (DECL_LANG_FLAG_5 (node))
389         fputs (" decl_5", file);
390       if (DECL_LANG_FLAG_6 (node))
391         fputs (" decl_6", file);
392       if (DECL_LANG_FLAG_7 (node))
393         fputs (" decl_7", file);
394
395       fprintf (file, " %s", mode_name[(int) mode]);
396
397       fprintf (file, " file %s line %d",
398                DECL_SOURCE_FILE (node), DECL_SOURCE_LINE (node));
399
400       print_node (file, "size", DECL_SIZE (node), indent + 4);
401       indent_to (file, indent + 3);
402       if (TREE_CODE (node) != FUNCTION_DECL)
403         fprintf (file, " align %d", DECL_ALIGN (node));
404       else if (DECL_INLINE (node))
405         fprintf (file, " frame_size %d", DECL_FRAME_SIZE (node));
406       else if (DECL_BUILT_IN (node))
407         fprintf (file, " built-in code %d", DECL_FUNCTION_CODE (node));
408       if (TREE_CODE (node) == FIELD_DECL)
409         print_node (file, "bitpos", DECL_FIELD_BITPOS (node), indent + 4);
410       if (DECL_POINTER_ALIAS_SET_KNOWN_P (node))
411         fprintf (file, " alias set %d", DECL_POINTER_ALIAS_SET (node));
412       print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4);
413       print_node_brief (file, "machine_attributes", DECL_MACHINE_ATTRIBUTES (node), indent + 4);
414       print_node_brief (file, "abstract_origin",
415                         DECL_ABSTRACT_ORIGIN (node), indent + 4);
416
417       print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4);
418       print_node (file, "result", DECL_RESULT (node), indent + 4);
419       print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4);
420
421       print_lang_decl (file, node, indent);
422
423       if (DECL_RTL (node) != 0)
424         {
425           indent_to (file, indent + 4);
426           print_rtl (file, DECL_RTL (node));
427         }
428
429       if (DECL_SAVED_INSNS (node) != 0)
430         {
431           indent_to (file, indent + 4);
432           if (TREE_CODE (node) == PARM_DECL)
433             {
434               fprintf (file, "incoming-rtl ");
435               print_rtl (file, DECL_INCOMING_RTL (node));
436             }
437           else if (TREE_CODE (node) == FUNCTION_DECL)
438             {
439               fprintf (file, "saved-insns ");
440               fprintf (file, HOST_PTR_PRINTF,
441                        (char *) DECL_SAVED_INSNS (node));
442             }
443         }
444
445       /* Print the decl chain only if decl is at second level.  */
446       if (indent == 4)
447         print_node (file, "chain", TREE_CHAIN (node), indent + 4);
448       else
449         print_node_brief (file, "chain", TREE_CHAIN (node), indent + 4);
450       break;
451
452     case 't':
453       if (TYPE_NO_FORCE_BLK (node))
454         fputs (" no-force-blk", file);
455       if (TYPE_STRING_FLAG (node))
456         fputs (" string-flag", file);
457       if (TYPE_NEEDS_CONSTRUCTING (node))
458         fputs (" needs-constructing", file);
459       if (TYPE_TRANSPARENT_UNION (node))
460         fputs (" transparent-union", file);
461       if (TYPE_PACKED (node))
462         fputs (" packed", file);
463
464       if (TYPE_LANG_FLAG_0 (node))
465         fputs (" type_0", file);
466       if (TYPE_LANG_FLAG_1 (node))
467         fputs (" type_1", file);
468       if (TYPE_LANG_FLAG_2 (node))
469         fputs (" type_2", file);
470       if (TYPE_LANG_FLAG_3 (node))
471         fputs (" type_3", file);
472       if (TYPE_LANG_FLAG_4 (node))
473         fputs (" type_4", file);
474       if (TYPE_LANG_FLAG_5 (node))
475         fputs (" type_5", file);
476       if (TYPE_LANG_FLAG_6 (node))
477         fputs (" type_6", file);
478
479       mode = TYPE_MODE (node);
480       fprintf (file, " %s", mode_name[(int) mode]);
481
482       print_node (file, "size", TYPE_SIZE (node), indent + 4);
483       indent_to (file, indent + 3);
484
485       fprintf (file, " align %d", TYPE_ALIGN (node));
486       fprintf (file, " symtab %d", TYPE_SYMTAB_ADDRESS (node));
487       fprintf (file, " alias set %d", TYPE_ALIAS_SET (node));
488
489       print_node (file, "attributes", TYPE_ATTRIBUTES (node), indent + 4);
490
491       if (TREE_CODE (node) == ARRAY_TYPE || TREE_CODE (node) == SET_TYPE)
492         print_node (file, "domain", TYPE_DOMAIN (node), indent + 4);
493       else if (TREE_CODE (node) == INTEGER_TYPE
494                || TREE_CODE (node) == BOOLEAN_TYPE
495                || TREE_CODE (node) == CHAR_TYPE)
496         {
497           fprintf (file, " precision %d", TYPE_PRECISION (node));
498           print_node (file, "min", TYPE_MIN_VALUE (node), indent + 4);
499           print_node (file, "max", TYPE_MAX_VALUE (node), indent + 4);
500         }
501       else if (TREE_CODE (node) == ENUMERAL_TYPE)
502         {
503           fprintf (file, " precision %d", TYPE_PRECISION (node));
504           print_node (file, "min", TYPE_MIN_VALUE (node), indent + 4);
505           print_node (file, "max", TYPE_MAX_VALUE (node), indent + 4);
506           print_node (file, "values", TYPE_VALUES (node), indent + 4);
507         }
508       else if (TREE_CODE (node) == REAL_TYPE)
509         fprintf (file, " precision %d", TYPE_PRECISION (node));
510       else if (TREE_CODE (node) == RECORD_TYPE
511                || TREE_CODE (node) == UNION_TYPE
512                || TREE_CODE (node) == QUAL_UNION_TYPE)
513         print_node (file, "fields", TYPE_FIELDS (node), indent + 4);
514       else if (TREE_CODE (node) == FUNCTION_TYPE || TREE_CODE (node) == METHOD_TYPE)
515         {
516           if (TYPE_METHOD_BASETYPE (node))
517             print_node_brief (file, "method basetype", TYPE_METHOD_BASETYPE (node), indent + 4);
518           print_node (file, "arg-types", TYPE_ARG_TYPES (node), indent + 4);
519         }
520       if (TYPE_CONTEXT (node))
521         print_node_brief (file, "context", TYPE_CONTEXT (node), indent + 4);
522
523       print_lang_type (file, node, indent);
524
525       if (TYPE_POINTER_TO (node) || TREE_CHAIN (node))
526         indent_to (file, indent + 3);
527       print_node_brief (file, "pointer_to_this", TYPE_POINTER_TO (node), indent + 4);
528       print_node_brief (file, "reference_to_this", TYPE_REFERENCE_TO (node), indent + 4);
529       print_node_brief (file, "chain", TREE_CHAIN (node), indent + 4);
530       break;
531
532     case 'b':
533       print_node (file, "vars", BLOCK_VARS (node), indent + 4);
534       print_node (file, "tags", BLOCK_TYPE_TAGS (node), indent + 4);
535       print_node (file, "supercontext", BLOCK_SUPERCONTEXT (node), indent + 4);
536       print_node (file, "subblocks", BLOCK_SUBBLOCKS (node), indent + 4);
537       print_node (file, "chain", BLOCK_CHAIN (node), indent + 4);
538       print_node (file, "abstract_origin",
539                   BLOCK_ABSTRACT_ORIGIN (node), indent + 4);
540       break;
541
542     case 'e':
543     case '<':
544     case '1':
545     case '2':
546     case 'r':
547     case 's':
548       if (TREE_CODE (node) == BIND_EXPR)
549         {
550           print_node (file, "vars", TREE_OPERAND (node, 0), indent + 4);
551           print_node (file, "body", TREE_OPERAND (node, 1), indent + 4);
552           print_node (file, "block", TREE_OPERAND (node, 2), indent + 4);
553           break;
554         }
555
556       len = tree_code_length[(int) TREE_CODE (node)];
557       /* Some nodes contain rtx's, not trees,
558          after a certain point.  Print the rtx's as rtx's.  */
559       first_rtl = first_rtl_op (TREE_CODE (node));
560       for (i = 0; i < len; i++)
561         {
562           if (i >= first_rtl)
563             {
564               indent_to (file, indent + 4);
565               fprintf (file, "rtl %d ", i);
566               if (TREE_OPERAND (node, i))
567                 print_rtl (file, (struct rtx_def *) TREE_OPERAND (node, i));
568               else
569                 fprintf (file, "(nil)");
570               fprintf (file, "\n");
571             }
572           else
573             {
574               char temp[10];
575
576               sprintf (temp, "arg %d", i);
577               print_node (file, temp, TREE_OPERAND (node, i), indent + 4);
578             }
579         }
580
581       if (TREE_CODE (node) == EXPR_WITH_FILE_LOCATION)
582         {
583           indent_to (file, indent+4);
584           fprintf (file, "%s:%d:%d", 
585                    (EXPR_WFL_FILENAME_NODE (node ) ?
586                     EXPR_WFL_FILENAME (node) : "(no file info)"),
587                    EXPR_WFL_LINENO (node), EXPR_WFL_COLNO (node));
588         }
589       break;
590
591     case 'c':
592     case 'x':
593       switch (TREE_CODE (node))
594         {
595         case INTEGER_CST:
596           if (TREE_CONSTANT_OVERFLOW (node))
597             fprintf (file, " overflow");
598
599           fprintf (file, " ");
600           if (TREE_INT_CST_HIGH (node) == 0)
601             fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED,
602                      TREE_INT_CST_LOW (node));
603           else if (TREE_INT_CST_HIGH (node) == -1
604                    && TREE_INT_CST_LOW (node) != 0)
605             {
606               fprintf (file, "-");
607               fprintf (file, HOST_WIDE_INT_PRINT_UNSIGNED,
608                        -TREE_INT_CST_LOW (node));
609             }
610           else
611             fprintf (file, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
612                      TREE_INT_CST_HIGH (node), TREE_INT_CST_LOW (node));
613           break;
614
615         case REAL_CST:
616           {
617             REAL_VALUE_TYPE d;
618
619             if (TREE_OVERFLOW (node))
620               fprintf (file, " overflow");
621
622 #if !defined(REAL_IS_NOT_DOUBLE) || defined(REAL_ARITHMETIC)
623             d = TREE_REAL_CST (node);
624             if (REAL_VALUE_ISINF (d))
625               fprintf (file, " Inf");
626             else if (REAL_VALUE_ISNAN (d))
627               fprintf (file, " Nan");
628             else
629               {
630                 char string[100];
631
632                 REAL_VALUE_TO_DECIMAL (d, "%e", string);
633                 fprintf (file, " %s", string);
634               }
635 #else
636             {
637               int i;
638               unsigned char *p = (unsigned char *) &TREE_REAL_CST (node);
639               fprintf (file, " 0x");
640               for (i = 0; i < sizeof TREE_REAL_CST (node); i++)
641                 fprintf (file, "%02x", *p++);
642               fprintf (file, "");
643             }
644 #endif
645           }
646           break;
647
648         case COMPLEX_CST:
649           print_node (file, "real", TREE_REALPART (node), indent + 4);
650           print_node (file, "imag", TREE_IMAGPART (node), indent + 4);
651           break;
652
653         case STRING_CST:
654           fprintf (file, " \"%s\"", TREE_STRING_POINTER (node));
655           /* Print the chain at second level.  */
656           if (indent == 4)
657             print_node (file, "chain", TREE_CHAIN (node), indent + 4);
658           else
659             print_node_brief (file, "chain", TREE_CHAIN (node), indent + 4);
660           break;
661
662         case IDENTIFIER_NODE:
663           print_lang_identifier (file, node, indent);
664           break;
665
666         case TREE_LIST:
667           print_node (file, "purpose", TREE_PURPOSE (node), indent + 4);
668           print_node (file, "value", TREE_VALUE (node), indent + 4);
669           print_node (file, "chain", TREE_CHAIN (node), indent + 4);
670           break;
671
672         case TREE_VEC:
673           len = TREE_VEC_LENGTH (node);
674           for (i = 0; i < len; i++)
675             if (TREE_VEC_ELT (node, i))
676               {
677                 char temp[10];
678                 sprintf (temp, "elt %d", i);
679                 indent_to (file, indent + 4);
680                 print_node_brief (file, temp, TREE_VEC_ELT (node, i), 0);
681               }
682           break;
683
684         case OP_IDENTIFIER:
685           print_node (file, "op1", TREE_PURPOSE (node), indent + 4);
686           print_node (file, "op2", TREE_VALUE (node), indent + 4);
687           break;
688
689         default:
690           if (TREE_CODE_CLASS (TREE_CODE (node)) == 'x')
691             lang_print_xnode (file, node, indent);
692           break;
693         }
694
695       break;
696     }
697
698   fprintf (file, ">");
699 }