aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2012-10-31 22:55:50 +0100
committerJanus Weil <janus@gcc.gnu.org>2012-10-31 22:55:50 +0100
commit755634e60252de3270554fd06c222da98128c3ac (patch)
treeb6e33fd27397f05e68dceaea242adf1b7842646d /gcc/fortran/trans-decl.c
parent03b06a83441cac588cf04f494915ffd3868a9bed (diff)
downloadgcc-755634e60252de3270554fd06c222da98128c3ac.zip
gcc-755634e60252de3270554fd06c222da98128c3ac.tar.gz
gcc-755634e60252de3270554fd06c222da98128c3ac.tar.bz2
re PR fortran/53718 ([OOP] gfortran generates asm label twice in the same output file)
2012-10-31 Janus Weil <janus@gcc.gnu.org> PR fortran/53718 * trans.h (GFC_DECL_PUSH_TOPLEVEL): Removed. * trans-decl.c (gfc_get_symbol_decl,gfc_generate_function_code): Remove GFC_DECL_PUSH_TOPLEVEL. (build_function_decl): Do not push __copy procedure to toplevel. 2012-10-31 Janus Weil <janus@gcc.gnu.org> PR fortran/53718 * gfortran.dg/class_54.f90: New. From-SVN: r193048
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r--gcc/fortran/trans-decl.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 910b150..7750217 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1488,10 +1488,7 @@ gfc_get_symbol_decl (gfc_symbol * sym)
if (sym->attr.vtab
|| (sym->name[0] == '_' && strncmp ("__def_init", sym->name, 10) == 0))
- {
- TREE_READONLY (decl) = 1;
- GFC_DECL_PUSH_TOPLEVEL (decl) = 1;
- }
+ TREE_READONLY (decl) = 1;
return decl;
}
@@ -1923,8 +1920,7 @@ build_function_decl (gfc_symbol * sym, bool global)
/* Layout the function declaration and put it in the binding level
of the current function. */
- if (global
- || (sym->name[0] == '_' && strncmp ("__copy", sym->name, 6) == 0))
+ if (global)
pushdecl_top_level (fndecl);
else
pushdecl (fndecl);
@@ -5425,10 +5421,7 @@ gfc_generate_function_code (gfc_namespace * ns)
next = DECL_CHAIN (decl);
DECL_CHAIN (decl) = NULL_TREE;
- if (GFC_DECL_PUSH_TOPLEVEL (decl))
- pushdecl_top_level (decl);
- else
- pushdecl (decl);
+ pushdecl (decl);
decl = next;
}
saved_function_decls = NULL_TREE;