xref: /netbsd-src/external/gpl3/gcc.old/dist/libphobos/testsuite/libphobos.exceptions/line_trace.d (revision 627f7eb200a4419d89b531d55fccd2ee3ffdcde0)
1 // { dg-output "object.Exception@.*: exception" }
main()2 void main()
3 {
4     try
5     {
6         f1();
7     }
8     catch (Exception e)
9     {
10         import core.stdc.stdio;
11         auto str = e.toString();
12         printf("%.*s\n", str.length, str.ptr);
13     }
14 }
15 
f1()16 void f1()
17 {
18     throw new Exception("exception");
19 }
20