summaryrefslogtreecommitdiff
path: root/gcc/fortran/class.c
diff options
context:
space:
mode:
authorjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-09 10:35:50 +0000
committerjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-09 10:35:50 +0000
commitcf25639386302ba6401b9fd891ef8f3dd62a1824 (patch)
tree1a2c9c20a1d34da10396da7173a04d9096157eea /gcc/fortran/class.c
parent7ac54e7158f13a07844f62cb665cebc022d7d8fa (diff)
downloadgcc-cf25639386302ba6401b9fd891ef8f3dd62a1824.tar.gz
2011-01-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/46313 * class.c (get_unique_type_string): Make type name start with upper case letter. 2011-01-09 Janus Weil <janus@gcc.gnu.org> PR fortran/46313 * gfortran.dg/class_35.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168610 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r--gcc/fortran/class.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c
index d07df87b088..2227f9e72f3 100644
--- a/gcc/fortran/class.c
+++ b/gcc/fortran/class.c
@@ -116,13 +116,16 @@ gfc_class_null_initializer (gfc_typespec *ts)
static void
get_unique_type_string (char *string, gfc_symbol *derived)
-{
+{
+ char dt_name[GFC_MAX_SYMBOL_LEN+1];
+ sprintf (dt_name, "%s", derived->name);
+ dt_name[0] = TOUPPER (dt_name[0]);
if (derived->module)
- sprintf (string, "%s_%s", derived->module, derived->name);
+ sprintf (string, "%s_%s", derived->module, dt_name);
else if (derived->ns->proc_name)
- sprintf (string, "%s_%s", derived->ns->proc_name->name, derived->name);
+ sprintf (string, "%s_%s", derived->ns->proc_name->name, dt_name);
else
- sprintf (string, "_%s", derived->name);
+ sprintf (string, "_%s", dt_name);
}