Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
4241b637
Commit
4241b637
authored
Sep 18, 2001
by
Richard Sandiford
Committed by
Richard Sandiford
Sep 18, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* g++.dg/eh/registers1.C: New test case.
From-SVN: r45679
parent
1cbfdb1f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
142 additions
and
0 deletions
+142
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/g++.dg/eh/registers1.C
+138
-0
No files found.
gcc/testsuite/ChangeLog
View file @
4241b637
2001-09-18 Richard Sandiford <rsandifo@redhat.com>
* g++.dg/eh/registers1.C: New test case.
2001-09-17 Richard Henderson <rth@redhat.com>
* gcc.dg/array-5.c: Fix VLA decomposition test.
...
...
gcc/testsuite/g++.dg/eh/registers1.C
0 → 100644
View file @
4241b637
// Try to check that registers are preserved when the stack is unwound.
// { dg-do run }
// { dg-options -O2 }
extern
"C"
void
exit
(
int
);
extern
"C"
void
abort
();
// This test case triggers up to DEPTH recursive calls to function
// foo(), These calls are numbered so that 0 is the innermost, 1 the
// second innermost, and so on. Each call caches NUM_VARS elements of
// both DOUBLE_SRC and INT_SRC and applies a trivial operation to each
// cached value. The innermost foo() call will throw an integer call
// number. The specified call should store its cached values in
// DOUBLE_DEST and INT_DEST, which main() will check.
const
int
num_vars
=
16
;
const
int
depth
=
3
;
float
float_src
[
num_vars
*
depth
];
float
float_dest
[
num_vars
];
int
int_src
[
num_vars
*
depth
];
int
int_dest
[
num_vars
];
void
foo
(
int
level
,
int
throw_to
)
{
float
*
fsrc
=
&
float_src
[
level
*
num_vars
];
float
f00
=
*
fsrc
++
+
1
.
0
f
;
float
f01
=
*
fsrc
++
+
1
.
0
f
;
float
f02
=
*
fsrc
++
+
1
.
0
f
;
float
f03
=
*
fsrc
++
+
1
.
0
f
;
float
f04
=
*
fsrc
++
+
1
.
0
f
;
float
f05
=
*
fsrc
++
+
1
.
0
f
;
float
f06
=
*
fsrc
++
+
1
.
0
f
;
float
f07
=
*
fsrc
++
+
1
.
0
f
;
float
f08
=
*
fsrc
++
+
1
.
0
f
;
float
f09
=
*
fsrc
++
+
1
.
0
f
;
float
f10
=
*
fsrc
++
+
1
.
0
f
;
float
f11
=
*
fsrc
++
+
1
.
0
f
;
float
f12
=
*
fsrc
++
+
1
.
0
f
;
float
f13
=
*
fsrc
++
+
1
.
0
f
;
float
f14
=
*
fsrc
++
+
1
.
0
f
;
float
f15
=
*
fsrc
++
+
1
.
0
f
;
int
*
isrc
=
&
int_src
[
level
*
num_vars
];
int
i00
=
*
isrc
++
+
1
;
int
i01
=
*
isrc
++
+
1
;
int
i02
=
*
isrc
++
+
1
;
int
i03
=
*
isrc
++
+
1
;
int
i04
=
*
isrc
++
+
1
;
int
i05
=
*
isrc
++
+
1
;
int
i06
=
*
isrc
++
+
1
;
int
i07
=
*
isrc
++
+
1
;
int
i08
=
*
isrc
++
+
1
;
int
i09
=
*
isrc
++
+
1
;
int
i10
=
*
isrc
++
+
1
;
int
i11
=
*
isrc
++
+
1
;
int
i12
=
*
isrc
++
+
1
;
int
i13
=
*
isrc
++
+
1
;
int
i14
=
*
isrc
++
+
1
;
int
i15
=
*
isrc
++
+
1
;
try
{
if
(
level
==
0
)
throw
throw_to
;
else
foo
(
level
-
1
,
throw_to
);
}
catch
(
int
i
)
{
if
(
i
==
level
)
{
float
*
fdest
=
float_dest
;
*
fdest
++
=
f00
;
*
fdest
++
=
f01
;
*
fdest
++
=
f02
;
*
fdest
++
=
f03
;
*
fdest
++
=
f04
;
*
fdest
++
=
f05
;
*
fdest
++
=
f06
;
*
fdest
++
=
f07
;
*
fdest
++
=
f08
;
*
fdest
++
=
f09
;
*
fdest
++
=
f10
;
*
fdest
++
=
f11
;
*
fdest
++
=
f12
;
*
fdest
++
=
f13
;
*
fdest
++
=
f14
;
*
fdest
++
=
f15
;
int
*
idest
=
int_dest
;
*
idest
++
=
i00
;
*
idest
++
=
i01
;
*
idest
++
=
i02
;
*
idest
++
=
i03
;
*
idest
++
=
i04
;
*
idest
++
=
i05
;
*
idest
++
=
i06
;
*
idest
++
=
i07
;
*
idest
++
=
i08
;
*
idest
++
=
i09
;
*
idest
++
=
i10
;
*
idest
++
=
i11
;
*
idest
++
=
i12
;
*
idest
++
=
i13
;
*
idest
++
=
i14
;
*
idest
++
=
i15
;
}
else
{
throw
;
}
}
}
int
main
()
{
for
(
int
i
=
0
;
i
<
depth
*
num_vars
;
i
++
)
{
int_src
[
i
]
=
i
*
i
;
float_src
[
i
]
=
i
*
2
.
0
f
;
}
for
(
int
level
=
0
;
level
<
depth
;
level
++
)
for
(
int
throw_to
=
0
;
throw_to
<=
level
;
throw_to
++
)
{
foo
(
level
,
throw_to
);
float
*
fsrc
=
&
float_src
[
throw_to
*
num_vars
];
int
*
isrc
=
&
int_src
[
throw_to
*
num_vars
];
for
(
int
i
=
0
;
i
<
num_vars
;
i
++
)
{
if
(
int_dest
[
i
]
!=
isrc
[
i
]
+
1
)
abort
();
if
(
float_dest
[
i
]
!=
fsrc
[
i
]
+
1
.
0
f
)
abort
();
}
}
exit
(
0
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment