#include "config.h"
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "tree.h"
+#include "real.h"
#include "ggc.h"
#include "langhooks.h"
debug_tree (node)
tree node;
{
- table = (struct bucket **) permalloc (HASH_SIZE * sizeof (struct bucket *));
- memset ((char *) table, 0, HASH_SIZE * sizeof (struct bucket *));
+ table = (struct bucket **) xcalloc (HASH_SIZE, sizeof (struct bucket *));
print_node (stderr, "", node, 0);
table = 0;
fprintf (stderr, "\n");
fprintf (file, " Nan");
else
{
- char string[100];
-
- REAL_VALUE_TO_DECIMAL (d, "%e", string);
+ char string[60];
+ real_to_decimal (string, &d, sizeof (string), 0, 1);
fprintf (file, " %s", string);
}
}
return;
}
- /* It is unsafe to look at any other filds of an ERROR_MARK node. */
+ /* It is unsafe to look at any other fields of an ERROR_MARK node. */
if (TREE_CODE (node) == ERROR_MARK)
{
print_node_brief (file, prefix, node, indent);
}
/* Add this node to the table. */
- b = (struct bucket *) permalloc (sizeof (struct bucket));
+ b = (struct bucket *) xmalloc (sizeof (struct bucket));
b->node = node;
b->next = table[hash];
table[hash] = b;
if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node))
fputs (" suppress-debug", file);
- if (TREE_CODE (node) == FUNCTION_DECL && DECL_INLINE (node))
+ if (TREE_CODE (node) == FUNCTION_DECL && DID_INLINE_FUNC (node))
+ fputs (" autoinline", file);
+ else if (TREE_CODE (node) == FUNCTION_DECL && DECL_INLINE (node))
fputs (" inline", file);
if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node))
fputs (" built-in", file);
if (TYPE_PACKED (node))
fputs (" packed", file);
+ if (TYPE_RESTRICT (node))
+ fputs (" restrict", file);
+
if (TYPE_LANG_FLAG_0 (node))
fputs (" type_0", file);
if (TYPE_LANG_FLAG_1 (node))
fprintf (file, " Nan");
else
{
- char string[100];
-
- REAL_VALUE_TO_DECIMAL (d, "%e", string);
+ char string[64];
+ real_to_decimal (string, &d, sizeof (string), 0, 1);
fprintf (file, " %s", string);
}
}
break;
case STRING_CST:
- fprintf (file, " \"%s\"", TREE_STRING_POINTER (node));
+ {
+ const char *p = TREE_STRING_POINTER (node);
+ int i = TREE_STRING_LENGTH (node);
+ fputs (" \"", file);
+ while (--i >= 0)
+ {
+ char ch = *p++;
+ if (ch >= ' ' && ch < 127)
+ putc (ch, file);
+ else
+ fprintf(file, "\\%03o", ch & 0xFF);
+ }
+ fputc ('\"', file);
+ }
/* Print the chain at second level. */
if (indent == 4)
print_node (file, "chain", TREE_CHAIN (node), indent + 4);