Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / torture / pr80075.C
blob5bc802027c09289e4fd962a84e65b7a468ae5c82
1 // { dg-do compile }
2 // { dg-additional-options "-fnon-call-exceptions" }
4 struct s {
5     int i;
6 };
8 extern int use_memcpy;
9 extern void my_memcpy(void*, void*, int);
11 int
12 f (struct s* p)
14   struct s a;
16   try
17     {
18       a = (struct s){};
19       if (!use_memcpy)
20         *p = a;
21       else
22         my_memcpy (p, &a, sizeof (struct s));
23     } catch (...) {
24         return 0;
25     }
26   return 1;