PR sanitizer/78651
* dwarf2asm.c: Include fold-const.c.
(dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
of decl rather than decl itself.
From-SVN: r258664
2018-03-19 Jakub Jelinek <jakub@redhat.com>
+ PR sanitizer/78651
+ * dwarf2asm.c: Include fold-const.c.
+ (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
+ of decl rather than decl itself.
+
PR rtl-optimization/84643
* memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
#include "dwarf2.h"
#include "function.h"
#include "emit-rtl.h"
+#include "fold-const.h"
#ifndef XCOFF_DEBUGGING_INFO
#define XCOFF_DEBUGGING_INFO 0
SET_DECL_ASSEMBLER_NAME (decl, id);
DECL_ARTIFICIAL (decl) = 1;
DECL_IGNORED_P (decl) = 1;
- DECL_INITIAL (decl) = decl;
+ DECL_INITIAL (decl) = build_fold_addr_expr (decl);
TREE_READONLY (decl) = 1;
TREE_STATIC (decl) = 1;