OSDN Git Service

Merge remote-tracking branch 'gnu/gcc-4_7-branch' into rework
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / gcov / gcov-7.C
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-7.C b/gcc/testsuite/g++.dg/gcov/gcov-7.C
new file mode 100644 (file)
index 0000000..db3e95a
--- /dev/null
@@ -0,0 +1,28 @@
+/* Check that Exception handler specification is not
+   mapped to the curly braces below the function
+   declaration.  */
+
+/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-do run { target native } } */
+
+struct foo
+{
+  foo () throw (int)
+    {                  /* count (-) */
+      throw (1);
+    }
+};
+
+int main ()
+{
+  try
+    {
+      foo f;
+    }
+  catch ( ...)
+    {
+      return 0;
+    }
+}
+
+/* { dg-final { run-gcov gcov-7.C } } */