diff options
Diffstat (limited to 'gcc/fortran/misc.c')
-rw-r--r-- | gcc/fortran/misc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/fortran/misc.c b/gcc/fortran/misc.c index 60c3cf1..8aa6df5 100644 --- a/gcc/fortran/misc.c +++ b/gcc/fortran/misc.c @@ -1,5 +1,6 @@ /* Miscellaneous stuff that doesn't fit anywhere else. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Andy Vaught @@ -158,8 +159,11 @@ gfc_typename (gfc_typespec *ts) sprintf (buffer, "TYPE(%s)", ts->u.derived->name); break; case BT_CLASS: - sprintf (buffer, "CLASS(%s)", - ts->u.derived->components->ts.u.derived->name); + ts = &ts->u.derived->components->ts; + if (ts->u.derived->attr.unlimited_polymorphic) + sprintf (buffer, "CLASS(*)"); + else + sprintf (buffer, "CLASS(%s)", ts->u.derived->name); break; case BT_ASSUMED: sprintf (buffer, "TYPE(*)"); |