repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr80075.C
blob
5bc802027c09289e4fd962a84e65b7a468ae5c82
1
// { dg-do compile }
2
// { dg-additional-options "-fnon-call-exceptions" }
3
4
struct s {
5
int i;
6
};
7
8
extern int use_memcpy;
9
extern void my_memcpy(void*, void*, int);
10
11
int
12
f (struct s* p)
13
{
14
struct s a;
15
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;
27
}