aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-11-12 19:08:35 +0000
committerJan Hubicka <jh@suse.cz>2003-11-12 19:08:35 +0000
commit72d5c2ebec13a35e2f543c11970f8c0f6fe23464 (patch)
tree812a49e5711752d5175d308d9babd19fc3d4a9ab /gcc/testsuite/g++.dg
parent76a6ba686dba381233d4bd8c76e204e1d268fc45 (diff)
* g++.dg/tree-ssa: New file.
* g++.dg/tree-ssa/tree-ssa.exp: New file based on gcc.dg/tree-ssa/tree-ssa.exp. * g++.dg/tree-ssa/nothrow-1.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@73506 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C19
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/tree-ssa.exp36
2 files changed, 55 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C b/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C
new file mode 100644
index 00000000000..6bd092977cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-cfg" } */
+double a;
+void t()
+{
+ a=1;
+}
+void t1(void);
+void abort(void);
+
+void q()
+{
+ try {
+ t();
+ }
+ catch (...) {abort();}
+}
+/* We shouldnotice nothrow attribute. */
+/* { dg-final { scan-tree-dump-times "exception" 0 "cfg"} } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/tree-ssa.exp b/gcc/testsuite/g++.dg/tree-ssa/tree-ssa.exp
new file mode 100644
index 00000000000..4788baa7838
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/tree-ssa.exp
@@ -0,0 +1,36 @@
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib g++-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CXXFLAGS
+if ![info exists DEFAULT_CXXFLAGS] then {
+ set DEFAULT_CXXFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[CS\]]] \
+ "" $DEFAULT_CXXFLAGS
+
+# All done.
+dg-finish