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
fc0c675f
Commit
fc0c675f
authored
May 06, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(truthvalue_conversion, case ADDR_EXPR): Don't treat address of
external decl as always nonzero. From-SVN: r11941
parent
2786cbad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
gcc/c-common.c
+6
-0
No files found.
gcc/c-common.c
View file @
fc0c675f
...
@@ -2080,6 +2080,12 @@ truthvalue_conversion (expr)
...
@@ -2080,6 +2080,12 @@ truthvalue_conversion (expr)
return
real_zerop
(
expr
)
?
boolean_false_node
:
boolean_true_node
;
return
real_zerop
(
expr
)
?
boolean_false_node
:
boolean_true_node
;
case
ADDR_EXPR
:
case
ADDR_EXPR
:
/* If we are taking the address of a external decl, it might be zero
if it is weak, so we cannot optimize. */
if
(
TREE_CODE_CLASS
(
TREE_CODE
(
TREE_OPERAND
(
expr
,
0
)))
==
'd'
&&
DECL_EXTERNAL
(
TREE_OPERAND
(
expr
,
0
)))
break
;
if
(
TREE_SIDE_EFFECTS
(
TREE_OPERAND
(
expr
,
0
)))
if
(
TREE_SIDE_EFFECTS
(
TREE_OPERAND
(
expr
,
0
)))
return
build
(
COMPOUND_EXPR
,
boolean_type_node
,
return
build
(
COMPOUND_EXPR
,
boolean_type_node
,
TREE_OPERAND
(
expr
,
0
),
boolean_true_node
);
TREE_OPERAND
(
expr
,
0
),
boolean_true_node
);
...
...
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