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
9edf6a4c
Commit
9edf6a4c
authored
Mar 09, 2003
by
Eric Botcazou
Committed by
Eric Botcazou
Mar 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/i386-loop-1.c: New test.
From-SVN: r64031
parent
f937d5e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
0 deletions
+109
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/i386-loop-1.c
+105
-0
No files found.
gcc/testsuite/ChangeLog
View file @
9edf6a4c
2003-03-09 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/i386-loop-1.c: New test.
2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/9970
PR c++/9970
...
...
gcc/testsuite/gcc.dg/i386-loop-1.c
0 → 100644
View file @
9edf6a4c
/* PR optimization/9888 */
/* { dg-do run { target i?86-*-* } } */
/* { dg-options "-mtune=k6 -O3" } */
/* Verify that GCC doesn't emit out of range 'loop' instructions. */
extern
void
abort
(
void
);
extern
void
exit
(
int
);
f1
(
a
)
long
a
;
{
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
)
{
if
(
--
a
==
-
1
)
return
i
;
}
return
-
1
;
}
f2
(
a
)
long
a
;
{
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
)
{
if
(
--
a
!=
-
1
)
return
i
;
}
return
-
1
;
}
f3
(
a
)
long
a
;
{
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
)
{
if
(
--
a
==
0
)
return
i
;
}
return
-
1
;
}
f4
(
a
)
long
a
;
{
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
)
{
if
(
--
a
!=
0
)
return
i
;
}
return
-
1
;
}
f5
(
a
)
long
a
;
{
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
)
{
if
(
++
a
==
0
)
return
i
;
}
return
-
1
;
}
f6
(
a
)
long
a
;
{
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
)
{
if
(
++
a
!=
0
)
return
i
;
}
return
-
1
;
}
int
main
()
{
if
(
f1
(
5L
)
!=
5
)
abort
();
if
(
f2
(
1L
)
!=
0
)
abort
();
if
(
f2
(
0L
)
!=
1
)
abort
();
if
(
f3
(
5L
)
!=
4
)
abort
();
if
(
f4
(
1L
)
!=
1
)
abort
();
if
(
f4
(
0L
)
!=
0
)
abort
();
if
(
f5
(
-
5L
)
!=
4
)
abort
();
if
(
f6
(
-
1L
)
!=
1
)
abort
();
if
(
f6
(
0L
)
!=
0
)
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