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
6e683090
Commit
6e683090
authored
Jun 07, 2002
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for PR 6950
From-SVN: r54350
parent
ce5c8722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
gcc/testsuite/gcc.dg/20020607-1.c
+40
-0
No files found.
gcc/testsuite/gcc.dg/20020607-1.c
0 → 100644
View file @
6e683090
/* PR middle-end/6950
gcc 3.0.4 mistakenly set lhs.low to 0 at the beginning of the num_eq
expansion; it should use a temporary.
/* { dg-do run } */
typedef
struct
cpp_num
cpp_num
;
struct
cpp_num
{
long
high
;
long
low
;
char
overflow
;
};
#define num_eq(num1, num2) (num1.low == num2.low && num1.high == num2.high)
static
cpp_num
num_equality_op
(
lhs
,
rhs
)
cpp_num
lhs
,
rhs
;
{
lhs
.
low
=
num_eq
(
lhs
,
rhs
);
lhs
.
high
=
0
;
lhs
.
overflow
=
0
;
return
lhs
;
}
int
main
()
{
cpp_num
a
=
{
1
,
2
};
cpp_num
b
=
{
3
,
4
};
cpp_num
result
=
num_equality_op
(
a
,
b
);
if
(
result
.
low
)
return
1
;
result
=
num_equality_op
(
a
,
a
);
if
(
!
result
.
low
)
return
2
;
return
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