summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-intrinsic.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-02 07:31:39 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-02 07:31:39 +0000
commit47c16a8cec2c48947e6d85683f5f916777ccc169 (patch)
tree3a8bf827ae1df7e637a2a4ede4dba5f0421ac0d2 /gcc/fortran/trans-intrinsic.c
parentb27941d363b11d115e30a9676e61c8536a12adf7 (diff)
downloadgcc-47c16a8cec2c48947e6d85683f5f916777ccc169.tar.gz
2009-12-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 154895 {after more plugin events from ICI folks} git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@154896 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-intrinsic.c')
-rw-r--r--gcc/fortran/trans-intrinsic.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 4273b8226e8..208a3b5a8d7 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -4715,14 +4715,20 @@ gfc_conv_same_type_as (gfc_se *se, gfc_expr *expr)
b = expr->value.function.actual->next->expr;
if (a->ts.type == BT_CLASS)
- gfc_add_component_ref (a, "$vindex");
+ {
+ gfc_add_component_ref (a, "$vptr");
+ gfc_add_component_ref (a, "$hash");
+ }
else if (a->ts.type == BT_DERIVED)
- a = gfc_int_expr (a->ts.u.derived->vindex);
+ a = gfc_int_expr (a->ts.u.derived->hash_value);
if (b->ts.type == BT_CLASS)
- gfc_add_component_ref (b, "$vindex");
+ {
+ gfc_add_component_ref (b, "$vptr");
+ gfc_add_component_ref (b, "$hash");
+ }
else if (b->ts.type == BT_DERIVED)
- b = gfc_int_expr (b->ts.u.derived->vindex);
+ b = gfc_int_expr (b->ts.u.derived->hash_value);
gfc_conv_expr (&se1, a);
gfc_conv_expr (&se2, b);
@@ -4733,21 +4739,6 @@ gfc_conv_same_type_as (gfc_se *se, gfc_expr *expr)
}
-/* Generate code for the EXTENDS_TYPE_OF intrinsic. */
-
-static void
-gfc_conv_extends_type_of (gfc_se *se, gfc_expr *expr)
-{
- gfc_expr *e;
- /* TODO: Implement EXTENDS_TYPE_OF. */
- gfc_error ("Intrinsic EXTENDS_TYPE_OF at %L not yet implemented",
- &expr->where);
- /* Just return 'false' for now. */
- e = gfc_logical_expr (false, &expr->where);
- gfc_conv_expr (se, e);
-}
-
-
/* Generate code for SELECTED_CHAR_KIND (NAME) intrinsic function. */
static void
@@ -5157,10 +5148,6 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
gfc_conv_same_type_as (se, expr);
break;
- case GFC_ISYM_EXTENDS_TYPE_OF:
- gfc_conv_extends_type_of (se, expr);
- break;
-
case GFC_ISYM_ABS:
gfc_conv_intrinsic_abs (se, expr);
break;
@@ -5538,6 +5525,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
case GFC_ISYM_CHMOD:
case GFC_ISYM_DTIME:
case GFC_ISYM_ETIME:
+ case GFC_ISYM_EXTENDS_TYPE_OF:
case GFC_ISYM_FGET:
case GFC_ISYM_FGETC:
case GFC_ISYM_FNUM: