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
1ca46974
Commit
1ca46974
authored
23 years ago
by
Janis Johnson
Committed by
Richard Henderson
23 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.misc-tests/gcov-3.c: New test.
From-SVN: r43943
parent
dec2b703
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.misc-tests/gcov-3.c
+45
-0
No files found.
gcc/testsuite/ChangeLog
View file @
1ca46974
2001-07-11 Janis Johnson <janis@us.ibm.com>
* gcc.misc-tests/gcov-3.c: New test.
2001-07-11 Richard Sandiford <rsandifo@redhat.com>
* gcc.c-torture/compile/20010711-1.c,
...
...
This diff is collapsed.
Click to expand it.
gcc/testsuite/gcc.misc-tests/gcov-3.c
0 → 100644
View file @
1ca46974
/* Test Gcov with computed gotos.
This is the same as test gcc.c-torture/execute/980526-1.c */
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
/* { dg-do run { target native } } */
int
expect_do1
=
1
,
expect_do2
=
2
;
static
int
doit
(
int
x
){
__label__
lbl1
;
__label__
lbl2
;
static
int
jtab_init
=
0
;
static
void
*
jtab
[
2
];
if
(
!
jtab_init
)
{
jtab
[
0
]
=
&&
lbl1
;
jtab
[
1
]
=
&&
lbl2
;
jtab_init
=
1
;
}
goto
*
jtab
[
x
];
lbl1
:
return
1
;
lbl2
:
return
2
;
}
static
void
do1
(
void
)
{
if
(
doit
(
0
)
!=
expect_do1
)
abort
();
}
static
void
do2
(
void
){
if
(
doit
(
1
)
!=
expect_do2
)
abort
();
}
int
main
(
void
){
/* count(1) */
#ifndef NO_LABEL_VALUES
do1
();
do2
();
#endif
exit
(
0
);
/* count(1) */
}
/* { dg-final { run-gcov gcov-3.c } } */
This diff is collapsed.
Click to expand it.
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