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
a7c683a8
Commit
a7c683a8
authored
Nov 07, 2000
by
Kaveh R. Ghazi
Committed by
Kaveh Ghazi
Nov 07, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.c-torture/execute/string-opt-1.c: New test.
From-SVN: r37301
parent
8735550f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.c-torture/execute/string-opt-1.c
+38
-0
No files found.
gcc/testsuite/ChangeLog
View file @
a7c683a8
2000-11-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c-torture/execute/string-opt-1.c: New test.
2000-11-07 Jeffrey Oldham <oldham@oz.codesourcery.com>
2000-11-07 Jeffrey Oldham <oldham@oz.codesourcery.com>
* gcc.c-torture/execute/va-arg-15.x: New file. Fails on
* gcc.c-torture/execute/va-arg-15.x: New file. Fails on
...
...
gcc/testsuite/gcc.c-torture/execute/string-opt-1.c
0 → 100644
View file @
a7c683a8
/* Copyright (C) 2000 Free Software Foundation.
Ensure all expected transformations of builtin strstr occur and
perform correctly.
Written by Kaveh R. Ghazi, 11/6/2000. */
extern
void
abort
(
void
);
extern
char
*
strstr
(
const
char
*
,
const
char
*
);
int
main
()
{
const
char
*
const
foo
=
"hello world"
;
if
(
strstr
(
foo
,
""
)
!=
foo
)
abort
();
if
(
strstr
(
foo
+
4
,
""
)
!=
foo
+
4
)
abort
();
if
(
strstr
(
foo
,
"h"
)
!=
foo
)
abort
();
if
(
strstr
(
foo
,
"w"
)
!=
foo
+
6
)
abort
();
if
(
strstr
(
foo
+
6
,
"o"
)
!=
foo
+
7
)
abort
();
return
0
;
}
#ifdef __OPTIMIZE__
/* When optimizing, all the above cases should be transformed into
something else. So any remaining calls to the original function
should abort. */
char
*
strstr
(
const
char
*
s1
,
const
char
*
s2
)
{
abort
();
}
#endif
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