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
38eb12ee
Commit
38eb12ee
authored
Jul 12, 2018
by
Jakub Jelinek
Committed by
Jakub Jelinek
Jul 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/torture/20180712-1.c: New test.
From-SVN: r262579
parent
d9931da9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
0 deletions
+78
-0
gcc/testsuite/ChangeLog
+2
-0
gcc/testsuite/gcc.dg/torture/20180712-1.c
+76
-0
No files found.
gcc/testsuite/ChangeLog
View file @
38eb12ee
2018-07-12 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/torture/20180712-1.c: New test.
PR tree-optimization/86492
* gcc.c-torture/execute/pr86492.c: New test.
...
...
gcc/testsuite/gcc.dg/torture/20180712-1.c
0 → 100644
View file @
38eb12ee
/* { dg-do run } */
/* { dg-additional-options "-fstack-protector" { target fstack_protector } } */
/* { dg-additional-options "-fPIC" { target fpic } } */
struct
S
{
int
*
l
,
*
u
;
};
int
a
[
3
];
__attribute__
((
noipa
))
struct
S
foo
(
void
)
{
int
*
p
=
a
,
*
q
=
a
+
1
;
struct
S
s
;
asm
volatile
(
""
:
"+g"
(
p
),
"+g"
(
q
)
:
:
"memory"
);
s
.
l
=
p
;
s
.
u
=
q
;
a
[
0
]
++
;
return
s
;
}
__attribute__
((
noipa
))
void
bar
(
struct
S
*
x
)
{
asm
volatile
(
""
:
:
"g"
(
x
)
:
"memory"
);
if
(
x
->
l
!=
a
||
x
->
u
!=
a
+
1
)
__builtin_abort
();
a
[
1
]
++
;
}
__attribute__
((
noipa
))
int
baz
(
int
*
x
,
int
*
y
)
{
int
r
=
-
1
;
asm
volatile
(
""
:
"+g"
(
r
)
:
"g"
(
x
),
"g"
(
y
)
:
"memory"
);
a
[
2
]
++
;
return
r
;
}
__attribute__
((
noipa
))
void
quux
(
void
)
{
asm
volatile
(
""
:
:
:
"memory"
);
}
__attribute__
((
noipa
))
void
qux
(
void
)
{
struct
S
v
=
foo
();
struct
S
w
;
struct
S
x
=
foo
();
int
y
=
0
;
w
.
l
=
x
.
l
;
w
.
u
=
x
.
u
;
if
(
baz
(
x
.
l
,
v
.
l
)
>
0
)
{
w
.
l
=
v
.
l
;
y
=
1
;
quux
();
}
if
(
baz
(
x
.
u
,
v
.
u
)
<
0
)
{
w
.
u
=
v
.
u
;
y
=
1
;
}
if
(
y
)
bar
(
&
w
);
}
int
main
()
{
qux
();
if
(
a
[
0
]
!=
2
||
a
[
1
]
!=
1
||
a
[
2
]
!=
2
)
__builtin_abort
();
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