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
d47a9a8e
Commit
d47a9a8e
authored
Jul 02, 2008
by
Andy Hutchinson
Committed by
Andy Hutchinson
Jul 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/pr36227.c: Correct test for targets where long is not the same size as pointer.
From-SVN: r137395
parent
a38b05ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
gcc/testsuite/ChangeLog
+5
-0
gcc/testsuite/gcc.dg/pr36227.c
+11
-1
No files found.
gcc/testsuite/ChangeLog
View file @
d47a9a8e
2008-07-02 Andy Hutchinson <hutchinsonandy@aim.com>
* gcc.dg/pr36227.c: Correct test for targets where long is
not the same size as pointer.
2008-07-02 Kaz Kojima <kkojima@gcc.gnu.org>
* g++.dg/cdce3.C: Test long double math functions for
...
...
gcc/testsuite/gcc.dg/pr36227.c
View file @
d47a9a8e
/* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-overflow=3" } */
#if (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
typedef
unsigned
long
long
ptrcast
;
#elif (__SIZEOF_LONG__ == __SIZEOF_POINTER__)
typedef
unsigned
long
ptrcast
;
#elif (__SIZEOF_INT__ == __SIZEOF_POINTER__)
typedef
unsigned
int
ptrcast
;
#else
#error Add target support here
#endif
volatile
unsigned
long
*
sat_add
(
volatile
unsigned
long
*
ptr
,
unsigned
long
i
,
volatile
unsigned
long
*
end
)
{
if
((
unsigned
long
)
ptr
+
i
*
sizeof
(
*
ptr
)
>
(
unsigned
long
)
ptr
)
/* { dg-bogus "pointer wraparound" } */
if
((
ptrcast
)
ptr
+
i
*
sizeof
(
*
ptr
)
>
(
ptrcast
)
ptr
)
/* { dg-bogus "pointer wraparound" } */
return
ptr
+
i
;
else
return
end
;
}
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