summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/attrib6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/attrib6.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib6.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/attrib6.C b/gcc/testsuite/g++.dg/ext/attrib6.C
new file mode 100644
index 000000000..2bdb180d1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib6.C
@@ -0,0 +1,21 @@
+// Copyright (C) 2002 Free Software Foundation.
+//
+// Test that the nothrow attribute is working correctly.
+//
+// Written by Richard Henderson, 26 May 2002.
+
+// { dg-do link }
+extern void foo() __attribute__((nothrow));
+extern void link_error();
+
+int main()
+{
+ try {
+ foo();
+ } catch (...) {
+ link_error();
+ }
+}
+
+void foo() { }
+