annotate libbacktrace/edtest2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* edtest2.c -- Test for libbacktrace storage allocation stress handling (p2)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2017-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 Redistribution and use in source and binary forms, with or without
kono
parents:
diff changeset
5 modification, are permitted provided that the following conditions are
kono
parents:
diff changeset
6 met:
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 (1) Redistributions of source code must retain the above copyright
kono
parents:
diff changeset
9 notice, this list of conditions and the following disclaimer.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 (2) Redistributions in binary form must reproduce the above copyright
kono
parents:
diff changeset
12 notice, this list of conditions and the following disclaimer in
kono
parents:
diff changeset
13 the documentation and/or other materials provided with the
kono
parents:
diff changeset
14 distribution.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 (3) The name of the author may not be used to
kono
parents:
diff changeset
17 endorse or promote products derived from this software without
kono
parents:
diff changeset
18 specific prior written permission.
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
kono
parents:
diff changeset
21 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
kono
parents:
diff changeset
22 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
kono
parents:
diff changeset
23 DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
kono
parents:
diff changeset
24 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
kono
parents:
diff changeset
25 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
kono
parents:
diff changeset
26 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
kono
parents:
diff changeset
27 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
kono
parents:
diff changeset
28 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
kono
parents:
diff changeset
29 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
kono
parents:
diff changeset
30 POSSIBILITY OF SUCH DAMAGE. */
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 /* This file intentionally written without any #include's
kono
parents:
diff changeset
33 */
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 extern int f3(int, int);
kono
parents:
diff changeset
36 extern int f2(int);
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 int f2(int x)
kono
parents:
diff changeset
39 {
kono
parents:
diff changeset
40 /* Returning a value here and elsewhere avoids a tailcall which
kono
parents:
diff changeset
41 would mess up the backtrace. */
kono
parents:
diff changeset
42 return f3(x, __LINE__) + 3;
kono
parents:
diff changeset
43 }