Commit f5acf0f2 by Paul Thomas

re PR fortran/55868 (gfortran generates for CLASS(*) __m_MOD___vtab__$tar on…

re PR fortran/55868 (gfortran generates for CLASS(*)   __m_MOD___vtab__$tar on NO_DOLLAR_IN_LABEL systems)

2013-01-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/55868
	* class.c (get_unique_type_string): Change $tar to STAR and
	replace sprintf by strcpy where there is no formatting.
	* decl.c (gfc_match_decl_type_spec): Change $tar to STAR.

2013-01-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/55868
	* gfortran.dg/unlimited_polymorphic_8.f90: Update
	scan-tree-dump-times for foo.0.x._vptr to deal with change from
	$tar to STAR.

From-SVN: r195124
parent 90229b5d
2013-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55868
* class.c (get_unique_type_string): Change $tar to STAR and
replace sprintf by strcpy where there is no formatting.
* decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
2013-01-09 Mikael Morin <mikael@gcc.gnu.org> 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/47203 PR fortran/47203
......
...@@ -460,9 +460,9 @@ get_unique_type_string (char *string, gfc_symbol *derived) ...@@ -460,9 +460,9 @@ get_unique_type_string (char *string, gfc_symbol *derived)
{ {
char dt_name[GFC_MAX_SYMBOL_LEN+1]; char dt_name[GFC_MAX_SYMBOL_LEN+1];
if (derived->attr.unlimited_polymorphic) if (derived->attr.unlimited_polymorphic)
sprintf (dt_name, "%s", "$tar"); strcpy (dt_name, "STAR");
else else
sprintf (dt_name, "%s", derived->name); strcpy (dt_name, derived->name);
dt_name[0] = TOUPPER (dt_name[0]); dt_name[0] = TOUPPER (dt_name[0]);
if (derived->attr.unlimited_polymorphic) if (derived->attr.unlimited_polymorphic)
sprintf (string, "_%s", dt_name); sprintf (string, "_%s", dt_name);
......
...@@ -2764,11 +2764,11 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag) ...@@ -2764,11 +2764,11 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag)
gfc_symbol *upe; gfc_symbol *upe;
gfc_symtree *st; gfc_symtree *st;
ts->type = BT_CLASS; ts->type = BT_CLASS;
gfc_find_symbol ("$tar", gfc_current_ns, 1, &upe); gfc_find_symbol ("STAR", gfc_current_ns, 1, &upe);
if (upe == NULL) if (upe == NULL)
{ {
upe = gfc_new_symbol ("$tar", gfc_current_ns); upe = gfc_new_symbol ("STAR", gfc_current_ns);
st = gfc_new_symtree (&gfc_current_ns->sym_root, "$tar"); st = gfc_new_symtree (&gfc_current_ns->sym_root, "STAR");
st->n.sym = upe; st->n.sym = upe;
gfc_set_sym_referenced (upe); gfc_set_sym_referenced (upe);
upe->refs++; upe->refs++;
...@@ -2783,9 +2783,9 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag) ...@@ -2783,9 +2783,9 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag)
} }
else else
{ {
st = gfc_find_symtree (gfc_current_ns->sym_root, "$tar"); st = gfc_find_symtree (gfc_current_ns->sym_root, "STAR");
if (st == NULL) if (st == NULL)
st = gfc_new_symtree (&gfc_current_ns->sym_root, "$tar"); st = gfc_new_symtree (&gfc_current_ns->sym_root, "STAR");
st->n.sym = upe; st->n.sym = upe;
upe->refs++; upe->refs++;
} }
......
2013-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55868
* gfortran.dg/unlimited_polymorphic_8.f90: Update
scan-tree-dump-times for foo.0.x._vptr to deal with change from
$tar to STAR.
2013-01-11 Andreas Schwab <schwab@linux-m68k.org> 2013-01-11 Andreas Schwab <schwab@linux-m68k.org>
* gcc.c-torture/compile/pr55921.c: Don't use matching constraints. * gcc.c-torture/compile/pr55921.c: Don't use matching constraints.
......
...@@ -16,5 +16,5 @@ contains ...@@ -16,5 +16,5 @@ contains
end end
! { dg-final { scan-tree-dump-times "foo.0.x._data = 0B;" 1 "original" } } ! { dg-final { scan-tree-dump-times "foo.0.x._data = 0B;" 1 "original" } }
! { dg-final { scan-tree-dump-times "foo.0.x._vptr = .* &__vtab__.tar;" 1 "original" } } ! { dg-final { scan-tree-dump-times "foo.0.x._vptr = .* &__vtab__STAR;" 1 "original" } }
! { dg-final { cleanup-tree-dump "optimized" } } ! { dg-final { cleanup-tree-dump "optimized" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment