diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-13 12:33:43 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-13 12:33:43 +0000 |
commit | 8f266cd9cee99dbd78d45c81e32d5b788104f9e3 (patch) | |
tree | 190944d72880df83808c66199c3e4f272b8161d5 /gcc/fortran/trans-expr.c | |
parent | 7137cdac42c49af85bc0c00b595913bcda9c8d88 (diff) | |
download | gcc-8f266cd9cee99dbd78d45c81e32d5b788104f9e3.tar.gz |
PR fortran/55935
* gimple-fold.c (get_symbol_constant_value): Call
unshare_expr.
(fold_gimple_assign): Don't call unshare_expr here.
(fold_ctor_reference): Call unshare_expr.
* trans-expr.c (gfc_conv_structure): Call
unshare_expr_without_location on the ctor elements.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195136 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index cad772f1cbd..e3386b18a29 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -6137,6 +6137,7 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init) gfc_symbol *vtabs; vtabs = cm->initializer->symtree->n.sym; vtab = gfc_build_addr_expr (NULL_TREE, gfc_get_symbol_decl (vtabs)); + vtab = unshare_expr_without_location (vtab); CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, vtab); } else if (cm->ts.u.derived && strcmp (cm->name, "_size") == 0) @@ -6150,6 +6151,7 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init) TREE_TYPE (cm->backend_decl), cm->attr.dimension, cm->attr.pointer, cm->attr.proc_pointer); + val = unshare_expr_without_location (val); /* Append it to the constructor list. */ CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, val); |