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
5dece937
Commit
5dece937
authored
Oct 30, 2001
by
Richard Kenner
Committed by
Geert Bosch
Oct 30, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* utils2.c (build_allocator): Test for SIZE overflow in array case too
From-SVN: r46653
parent
de4bf6cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
gcc/ada/ChangeLog
+4
-0
gcc/ada/utils2.c
+5
-0
No files found.
gcc/ada/ChangeLog
View file @
5dece937
2001-10-30 Richard Kenner <kenner@gnat.com>
* utils2.c (build_allocator): Test for SIZE overflow in array case too
2001-10-30 Geert Bosch <bosch@gnat.com>
2001-10-30 Geert Bosch <bosch@gnat.com>
* ali-util.adb (Initialize_Checksum): Use out-mode instead of in out.
* ali-util.adb (Initialize_Checksum): Use out-mode instead of in out.
...
...
gcc/ada/utils2.c
View file @
5dece937
...
@@ -1855,6 +1855,11 @@ build_allocator (type, init, result_type, gnat_proc, gnat_pool)
...
@@ -1855,6 +1855,11 @@ build_allocator (type, init, result_type, gnat_proc, gnat_pool)
&&
contains_placeholder_p
(
size
))
&&
contains_placeholder_p
(
size
))
size
=
build
(
WITH_RECORD_EXPR
,
sizetype
,
size
,
init
);
size
=
build
(
WITH_RECORD_EXPR
,
sizetype
,
size
,
init
);
/* If the size overflows, pass -1 so the allocator will raise
storage error. */
if
(
TREE_CODE
(
size
)
==
INTEGER_CST
&&
TREE_OVERFLOW
(
size
))
size
=
ssize_int
(
-
1
);
storage
=
build_call_alloc_dealloc
(
NULL_TREE
,
size
,
storage
=
build_call_alloc_dealloc
(
NULL_TREE
,
size
,
TYPE_ALIGN
(
storage_type
),
TYPE_ALIGN
(
storage_type
),
gnat_proc
,
gnat_pool
);
gnat_proc
,
gnat_pool
);
...
...
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