summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20050811-1.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-20 16:03:58 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-20 16:03:58 +0000
commit5f0ef10711ef3c7175c4e229001ac03fdd9fb1d9 (patch)
treea4df578ab0cd10699ab3f63bdf10bd3ac48643fc /gcc/testsuite/gcc.dg/20050811-1.c
parente85b7f3c97d9ab62a83c62fd0066c4450c3ce753 (diff)
downloadgcc-5f0ef10711ef3c7175c4e229001ac03fdd9fb1d9.tar.gz
* tree-pass.h (TDF_GRAPH): Define.
* tree-dump.c (dump_options): Don't set TDF_GRAPH in "all". * passes.c (finish_optimization_passes): Only call finish_graph_dump_file if TDF_GRAPH is set. (execute_one_pass): Only call clean_graph_dump_file if dump_file != NULL. Set TDF_GRAPH bit. (execute_todo): Call print_rtl_graph_with_bb if TDF_GRAPH is set. * gcc.dg/20050811-1.c: New test. * gcc.dg/20050811-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103304 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20050811-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20050811-1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20050811-1.c b/gcc/testsuite/gcc.dg/20050811-1.c
new file mode 100644
index 00000000000..cfc181692c1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20050811-1.c
@@ -0,0 +1,20 @@
+/* Test whether -dav doesn't crash. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -dav" } */
+
+int foo (void)
+{
+ return 6;
+}
+
+int bar (int x)
+{
+ if (x < 0)
+ return foo () + 8;
+ else if (x > 0)
+ return 2 * foo ();
+ else
+ return foo ();
+}
+
+// { dg-final { cleanup-rtl-dump "*" } }