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
03b2a15f
Commit
03b2a15f
authored
May 21, 2016
by
Jan Hubicka
Committed by
Jan Hubicka
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* tree.c (array_at_struct_end_p): Look through MEM_REF.
From-SVN: r236557
parent
88aea79f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
gcc/ChangeLog
+4
-0
gcc/tree.c
+19
-0
No files found.
gcc/ChangeLog
View file @
03b2a15f
2016-05-21 Jan Hubicka <hubicka@ucw.cz>
* tree.c (array_at_struct_end_p): Look through MEM_REF.
2016-05-21 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/71179
...
...
gcc/tree.c
View file @
03b2a15f
...
...
@@ -13076,9 +13076,28 @@ array_at_struct_end_p (tree ref)
ref
=
TREE_OPERAND
(
ref
,
0
);
}
tree
size
=
NULL
;
if
(
TREE_CODE
(
ref
)
==
MEM_REF
&&
TREE_CODE
(
TREE_OPERAND
(
ref
,
0
))
==
ADDR_EXPR
)
{
size
=
TYPE_SIZE
(
TREE_TYPE
(
ref
));
ref
=
TREE_OPERAND
(
TREE_OPERAND
(
ref
,
0
),
0
);
}
/* If the reference is based on a declared entity, the size of the array
is constrained by its given domain. (Do not trust commons PR/69368). */
if
(
DECL_P
(
ref
)
/* Be sure the size of MEM_REF target match. For example:
char buf[10];
struct foo *str = (struct foo *)&buf;
str->trailin_array[2] = 1;
is valid because BUF allocate enough space. */
&&
(
!
size
||
operand_equal_p
(
DECL_SIZE
(
ref
),
size
,
0
))
&&
!
(
flag_unconstrained_commons
&&
TREE_CODE
(
ref
)
==
VAR_DECL
&&
DECL_COMMON
(
ref
)))
return
false
;
...
...
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