aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-11-19 20:38:07 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-11-19 15:38:07 -0500
commited239f5a439be5360c431fea7ff3063c6d844692 (patch)
tree2542ba620d211064d29aeacfe75ac81b9312fd17 /gcc/varasm.c
parenta5a9cb26e59353c633db9c6eb2eac959d1b3e697 (diff)
downloadgcc-ed239f5a439be5360c431fea7ff3063c6d844692.zip
gcc-ed239f5a439be5360c431fea7ff3063c6d844692.tar.gz
gcc-ed239f5a439be5360c431fea7ff3063c6d844692.tar.bz2
tree.def (VIEW_CONVERT_EXPR): New tree code.
* tree.def (VIEW_CONVERT_EXPR): New tree code. * tree.h (handled_component_p): New declaration. * alias.c (handled_component_p): Move function from here ... * expr.c (handled_component_p): ... to here and non longer static. (is_zeros_p, case VIEW_CONVERT_EXPR): New case. (store_field): Remove unneeded MEM_COPY_ATTRIBUTES call. (get_inner_reference): Handle VIEW_CONVERT_EXPR. (expand_expr, case VAR_DECL): Clean up handling of re-layout case. (expand_expr, case VIEW_CONVERT_EXPR): New case. (expand_expr, cse ADDR_EXPR): No need to copy if already BIGGEST_ALIGNMENT. * fold-const.c (fold, case VIEW_CONVERT_EXPR): New case. * varasm.c (initializer_constant_value_p, case VIEW_CONVERT_EXPR): New. (output_constant): Handle VIEW_CONVERT_EXPR. * dwarf2out.c (loc-descriptor_from_tree, add_bound_info): Add new case for VIEW_CONVERT_EXPR. From-SVN: r47179
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 6972762..32dabe8 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -4288,6 +4288,7 @@ initializer_constant_valid_p (value, endtype)
case FDESC_EXPR:
return staticp (TREE_OPERAND (value, 0)) ? TREE_OPERAND (value, 0) : 0;
+ case VIEW_CONVERT_EXPR:
case NON_LVALUE_EXPR:
return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype);
@@ -4442,10 +4443,9 @@ output_constant (exp, size, align)
{
enum tree_code code = TREE_CODE (TREE_TYPE (exp));
- /* Some front-ends use constants other than the standard
- language-indepdent varieties, but which may still be output
- directly. Give the front-end a chance to convert EXP to a
- language-independent representation. */
+ /* Some front-ends use constants other than the standard language-indepdent
+ varieties, but which may still be output directly. Give the front-end a
+ chance to convert EXP to a language-independent representation. */
if (lang_expand_constant)
{
exp = (*lang_expand_constant) (exp);
@@ -4462,9 +4462,9 @@ output_constant (exp, size, align)
while ((TREE_CODE (exp) == NOP_EXPR
&& (TREE_TYPE (exp) == TREE_TYPE (TREE_OPERAND (exp, 0))
|| AGGREGATE_TYPE_P (TREE_TYPE (exp))))
- || (TREE_CODE (exp) == CONVERT_EXPR
- && code == UNION_TYPE)
- || TREE_CODE (exp) == NON_LVALUE_EXPR)
+ || (TREE_CODE (exp) == CONVERT_EXPR && code == UNION_TYPE)
+ || TREE_CODE (exp) == NON_LVALUE_EXPR
+ || TREE_CODE (exp) == VIEW_CONVERT_EXPR)
{
exp = TREE_OPERAND (exp, 0);
code = TREE_CODE (TREE_TYPE (exp));