re PR tree-optimization/31847 (Printing to dump file broken)
authorSimon Martin <simartin@users.sourceforge.net>
Tue, 8 May 2007 15:33:56 +0000 (15:33 +0000)
committerSimon Martin <simartin@gcc.gnu.org>
Tue, 8 May 2007 15:33:56 +0000 (15:33 +0000)
2007-05-08  Simon Martin  <simartin@users.sourceforge.net>

PR 31847
* tree-dump.c (dump_options): Don't use TDF_DIAGNOSTIC in "*-all" tree
dumps.

From-SVN: r124551

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr31847.c [new file with mode: 0644]
gcc/tree-dump.c

index d0753beaa78aeec8a2a5d9e784f44c78170b6adc..a28475a8b7fc5bb238e5e3217ba2c23dc9df0d68 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-08  Simon Martin  <simartin@users.sourceforge.net>
+
+       PR 31847
+       * tree-dump.c (dump_options): Don't use TDF_DIAGNOSTIC in "*-all" tree
+       dumps.
+
 2007-05-08  Sandra Loosemore  <sandra@codesourcery.com>
             Nigel Stephens  <nigel@mips.com>
 
index 1542977acedb7f34dd664d2f36cc9563c8129e80..bbda63cf78163b59acc1d0e28a37fadbf09177d6 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-08  Simon Martin  <simartin@users.sourceforge.net>
+
+       PR 31847
+       * gcc.dg/pr31847.c: New test.
+
 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/31692
diff --git a/gcc/testsuite/gcc.dg/pr31847.c b/gcc/testsuite/gcc.dg/pr31847.c
new file mode 100644 (file)
index 0000000..4b945a9
--- /dev/null
@@ -0,0 +1,15 @@
+/* PR 31847 */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre-all" } */
+
+extern int bar(int);
+
+int foo()
+{
+  int a = 0;
+  return bar(a);
+}
+
+/* { dg-final { scan-tree-dump-not "Created value  for " "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
index ea8f378d2d11c88d2ac6c03b47293a8e914680da..16f71df20287d8986060f340f079f5f53cad7823 100644 (file)
@@ -803,7 +803,7 @@ static const struct dump_option_value_info dump_options[] =
   {"stmtaddr", TDF_STMTADDR},
   {"memsyms", TDF_MEMSYMS},
   {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA 
-           | TDF_STMTADDR | TDF_GRAPH)},
+           | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC)},
   {NULL, 0}
 };