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
5b18be0b
Commit
5b18be0b
authored
Jan 08, 2020
by
Jeff Law
Committed by
Jeff Law
Jan 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/Wstringop-overflow-27.c: Make testnames unique.
From-SVN: r280016
parent
51f90235
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/Wstringop-overflow-27.c
+4
-4
No files found.
gcc/testsuite/ChangeLog
View file @
5b18be0b
2020-01-08 Jeff Law <law@redhat.com>
* gcc.dg/Wstringop-overflow-27.c: Make testnames unique.
2020-01-08 Joel Brobecker <brobecker@adacore.com>
2020-01-08 Joel Brobecker <brobecker@adacore.com>
Olivier Hainque <hainque@adacore.com>
Olivier Hainque <hainque@adacore.com>
...
...
gcc/testsuite/gcc.dg/Wstringop-overflow-27.c
View file @
5b18be0b
...
@@ -260,8 +260,8 @@ void test_strcpy_warn (const char *s)
...
@@ -260,8 +260,8 @@ void test_strcpy_warn (const char *s)
that the conversion from signed int to size_t doesn't prevent
that the conversion from signed int to size_t doesn't prevent
the detection. */
the detection. */
int
n
=
strlen
(
a
);
int
n
=
strlen
(
a
);
char
*
t
=
(
char
*
)
calloc
(
n
,
1
);
// { dg-message "at offset 0 to an object with size 3 allocated by 'calloc' here" "calloc note" { xfail *-*-* } }
char
*
t
=
(
char
*
)
calloc
(
n
,
1
);
// { dg-message "at offset 0 to an object with size 3 allocated by 'calloc' here" "calloc note
1
" { xfail *-*-* } }
// { dg-message "at offset 0 to an object with size at most 3 allocated by 'calloc' here" "calloc note" { target *-*-* } .-1 }
// { dg-message "at offset 0 to an object with size at most 3 allocated by 'calloc' here" "calloc note
2
" { target *-*-* } .-1 }
strcpy
(
t
,
a
);
// { dg-warning "writing 4 bytes into a region of size (between 0 and )?3 " }
strcpy
(
t
,
a
);
// { dg-warning "writing 4 bytes into a region of size (between 0 and )?3 " }
sink
(
t
);
sink
(
t
);
...
@@ -270,8 +270,8 @@ void test_strcpy_warn (const char *s)
...
@@ -270,8 +270,8 @@ void test_strcpy_warn (const char *s)
{
{
const
char
a
[]
=
"1234"
;
const
char
a
[]
=
"1234"
;
size_t
n
=
strlen
(
a
);
size_t
n
=
strlen
(
a
);
char
*
t
=
(
char
*
)
malloc
(
n
);
// { dg-message "at offset 0 to an object with size 4 allocated by 'malloc' here" "malloc note" { xfail *-*-* } }
char
*
t
=
(
char
*
)
malloc
(
n
);
// { dg-message "at offset 0 to an object with size 4 allocated by 'malloc' here" "malloc note
1
" { xfail *-*-* } }
// { dg-message "at offset 0 to an object with size at most 4 allocated by 'malloc' here" "malloc note" { target *-*-* } .-1 }
// { dg-message "at offset 0 to an object with size at most 4 allocated by 'malloc' here" "malloc note
2
" { target *-*-* } .-1 }
strcpy
(
t
,
a
);
// { dg-warning "writing 5 bytes into a region of size (between 0 and )?4 " }
strcpy
(
t
,
a
);
// { dg-warning "writing 5 bytes into a region of size (between 0 and )?4 " }
sink
(
t
);
sink
(
t
);
}
}
...
...
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