diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-09-23 17:25:55 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-09-23 17:25:55 +0200 |
commit | 54f9184b594d38d288471029277733a0c3374a65 (patch) | |
tree | 1dadd41b6c39db25eeeb3b55913dcf79d26ad6f7 /gcc/fortran | |
parent | ad01608e1402904d7b9041a985a05c4348d2085b (diff) | |
download | gcc-54f9184b594d38d288471029277733a0c3374a65.zip gcc-54f9184b594d38d288471029277733a0c3374a65.tar.gz gcc-54f9184b594d38d288471029277733a0c3374a65.tar.bz2 |
re PR fortran/63331 (Fortran -fcompare-debug issues)
PR fortran/63331
* trans-types.c (gfc_get_array_descr_info): Build DEBUG_EXPR_DECL
instead of VAR_DECL for base_decl.
* gfortran.dg/pr63331.f90: New test.
From-SVN: r215516
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-types.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 245a554..214e101 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2014-09-23 Jakub Jelinek <jakub@redhat.com> + + PR fortran/63331 + * trans-types.c (gfc_get_array_descr_info): Build DEBUG_EXPR_DECL + instead of VAR_DECL for base_decl. + 2014-09-21 Jan Hubicka <hubicka@ucw.cz> * openmp.c (omp_context): Rename to ... diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 032147d..6bfe14c 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -3041,8 +3041,10 @@ gfc_get_array_descr_info (const_tree type, struct array_descr_info *info) base_decl = GFC_TYPE_ARRAY_BASE_DECL (type, indirect); if (!base_decl) { - base_decl = build_decl (input_location, VAR_DECL, NULL_TREE, - indirect ? build_pointer_type (ptype) : ptype); + base_decl = make_node (DEBUG_EXPR_DECL); + DECL_ARTIFICIAL (base_decl) = 1; + TREE_TYPE (base_decl) = indirect ? build_pointer_type (ptype) : ptype; + DECL_MODE (base_decl) = TYPE_MODE (TREE_TYPE (base_decl)); GFC_TYPE_ARRAY_BASE_DECL (type, indirect) = base_decl; } info->base_decl = base_decl; |