Commit da54e73b by Roger Sayle Committed by Roger Sayle

re PR middle-end/18259 (-fdump-tree-tu omits real constant values)

2006-03-16  Roger Sayle  <roger@eyesopen.com>
	    Daniel Speyer  <dspeyer@wam.umd.edu>

	PR middle-end/18259
	* tree-dump.c (dump_real): New function.
	(dequeue_and_dump) <REAL_CST>: Use it to dump FP constants.
	* Makefile.in (REAL_H): New macro for dependencies on real.h.
	(tree-dump.o): Add $(REAL_H) to the dependencies.


Co-Authored-By: Daniel Speyer <dspeyer@wam.umd.edu>

From-SVN: r112147
parent 3406876b
2006-03-16 Roger Sayle <roger@eyesopen.com>
Daniel Speyer <dspeyer@wam.umd.edu>
PR middle-end/18259
* tree-dump.c (dump_real): New function.
(dequeue_and_dump) <REAL_CST>: Use it to dump FP constants.
* Makefile.in (REAL_H): New macro for dependencies on real.h.
(tree-dump.o): Add $(REAL_H) to the dependencies.
2006-03-16 Roger Sayle <roger@eyesopen.com>
PR middle-end/21781
* real.c (real_from_string): If the mantissa is zero, don't bother
......
/* Tree-dumping functionality for intermediate representation.
Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005
Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com>
......@@ -32,6 +32,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "tree-pass.h"
#include "langhooks.h"
#include "tree-iterator.h"
#include "real.h"
static unsigned int queue (dump_info_p, tree, int);
static void dump_index (dump_info_p, unsigned int);
......@@ -179,6 +180,19 @@ dump_int (dump_info_p di, const char *field, int i)
di->column += 14;
}
/* Dump the floating point value R, using FIELD to identify it. */
static void
dump_real (dump_info_p di, const char *field, const REAL_VALUE_TYPE *r)
{
char buf[32];
real_to_decimal (buf, r, sizeof (buf), 0, true);
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %s ", field, buf);
di->column += strlen (buf) + 7;
}
/* Dump the string S. */
void
......@@ -531,6 +545,10 @@ dequeue_and_dump (dump_info_p di)
dump_int (di, "lngt", TREE_STRING_LENGTH (t));
break;
case REAL_CST:
dump_real (di, "valu", TREE_REAL_CST_PTR (t));
break;
case TRUTH_NOT_EXPR:
case ADDR_EXPR:
case INDIRECT_REF:
......
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