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
31475afa
Commit
31475afa
authored
6 years ago
by
Jeff Law
Committed by
Jeff Law
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t.
From-SVN: r266804
parent
037586dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/strlenopt-58.c
+3
-3
No files found.
gcc/testsuite/ChangeLog
View file @
31475afa
2018-12-04 Jeff Law <law@redhat.com>
* gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t.
2018-12-04 Martin Sebor <msebor@redhat.com>
* gcc.target/i386/attr-aligned-2.c: New test.
...
...
This diff is collapsed.
Click to expand it.
gcc/testsuite/gcc.dg/strlenopt-58.c
View file @
31475afa
...
...
@@ -34,8 +34,8 @@ extern void* memchr (const void*, int, size_t);
static
const
wchar_t
wc
=
L'1'
;
static
const
wchar_t
ws1
[]
=
L"1"
;
static
const
wchar_t
wsx
[]
=
L"
\x1234
5678"
;
static
const
wchar_t
ws4
[]
=
L"
\x0012
3456
\x1200
5678
\x1234
0078
\x1234
5600"
;
static
const
wchar_t
wsx
[]
=
L"
\x1234
5678"
;
/* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */
static
const
wchar_t
ws4
[]
=
L"
\x0012
3456
\x1200
5678
\x1234
0078
\x1234
5600"
;
/* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */
void
test_wide
(
void
)
{
...
...
@@ -47,7 +47,7 @@ void test_wide (void)
ELIM
(
memchr
(
L""
+
1
,
0
,
0
)
==
0
);
ELIM
(
memchr
(
&
wc
+
1
,
0
,
0
)
==
0
);
ELIM
(
memchr
(
L"
\x1234
5678"
,
0
,
sizeof
(
wchar_t
))
==
0
);
ELIM
(
memchr
(
L"
\x1234
5678"
,
0
,
sizeof
(
wchar_t
))
==
0
);
/* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */
const
size_t
nb
=
sizeof
ws4
;
const
size_t
nwb
=
sizeof
(
wchar_t
);
...
...
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