From 993c61a5b8dc6a46088617ca3509a955e41a28bd Mon Sep 17 00:00:00 2001 From: Craig Rasmussen Date: Wed, 22 Mar 2017 15:39:45 -0700 Subject: [PATCH] Added conversions for DOUBLECOMPLEX. --- fortran/trans/fast2sage.str | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/fortran/trans/fast2sage.str b/fortran/trans/fast2sage.str index ec9b74b..9b7c4c4 100644 --- a/fortran/trans/fast2sage.str +++ b/fortran/trans/fast2sage.str @@ -188,6 +188,7 @@ signature TYPE_FLOAT : TYPE_FLOAT TYPE_DOUBLE : TYPE_DOUBLE TYPE_COMPLEX : TYPE_COMPLEX + TYPE_DOUBLE_COMPLEX : TYPE_DOUBLE_COMPLEX TYPE_BOOL : TYPE_BOOL TYPE_CHAR : TYPE_CHAR TYPE_LAST : TYPE_LAST @@ -248,7 +249,7 @@ sg-fortran-operator = <+ ? FORTRAN_INTRINSIC_GT() ; ! SgToken_ROSE_Fortran_Operators(10015) <+ ? FORTRAN_INTRINSIC_NOT() ; ! SgToken_ROSE_Fortran_Operators(10016) -// e_unknown=0,e_void,e_int,e_float,e_double,e_complex,e_bool,e_char,e_last +// e_unknown=0,e_void,e_int,e_float,e_double,e_complex,e_double_complex,e_bool,e_char,e_last sg-type-enum = ? TYPE_UNKNOWN() ; ! SgUntypedType_type_enum(0) <+ ? TYPE_VOID() ; ! SgUntypedType_type_enum(1) @@ -256,9 +257,9 @@ sg-type-enum = <+ ? TYPE_FLOAT() ; ! SgUntypedType_type_enum(3) <+ ? TYPE_DOUBLE() ; ! SgUntypedType_type_enum(4) <+ ? TYPE_COMPLEX() ; ! SgUntypedType_type_enum(5) - <+ ? TYPE_BOOL() ; ! SgUntypedType_type_enum(6) - <+ ? TYPE_CHAR() ; ! SgUntypedType_type_enum(7) -//TODO - DOUBLECOMPLEX + <+ ? TYPE_DOUBLE_COMPLEX() ; ! SgUntypedType_type_enum(6) + <+ ? TYPE_BOOL() ; ! SgUntypedType_type_enum(7) + <+ ? TYPE_CHAR() ; ! SgUntypedType_type_enum(8) sg-build-void-type = ! SgUntypedType("void",NULL_EXPR(),0,0,0, 1,0,0,NULL_EXPR(),"",0,TYPE_VOID()) @@ -272,6 +273,8 @@ sg-build-intrinsic-type = 1,0,0, NULL_EXPR(),"",0,TYPE_DOUBLE()) <+ ? COMPLEX() ; ! SgUntypedType("complex",NULL_EXPR(),0,0,0, 1,0,0, NULL_EXPR(),"",0,TYPE_COMPLEX()) + <+ ? DOUBLECOMPLEX() ; ! SgUntypedType("double_complex",NULL_EXPR(),0,0,0, + 1,0,0, NULL_EXPR(),"",0,TYPE_DOUBLE_COMPLEX()) <+ ? LOGICAL() ; ! SgUntypedType("bool", NULL_EXPR(),0,0,0, 1,0,0, NULL_EXPR(),"",0,TYPE_BOOL()) <+ ? CHARACTER() ; ! SgUntypedType("char", NULL_EXPR(),0,0,0, @@ -282,14 +285,12 @@ sg-build-intrinsic-type(|kind) = 1,0,0, NULL_EXPR(),"",0,TYPE_INT()) <+ ? REAL() ; ! SgUntypedType("float", kind,1,0,0, 1,0,0, NULL_EXPR(),"",0,TYPE_FLOAT()) - <+ ? DOUBLEPRECISION() ; ! SgUntypedType("double", kind,1,0,0, - 1,0,0, NULL_EXPR(),"",0,TYPE_DOUBLE()) <+ ? COMPLEX() ; ! SgUntypedType("complex", kind,1,0,0, 1,0,0, NULL_EXPR(),"",0,TYPE_COMPLEX()) <+ ? LOGICAL() ; ! SgUntypedType("bool", kind,1,0,0, 1,0,0, NULL_EXPR(),"",0,TYPE_BOOL()) - <+ ? CHARACTER() ; ! SgUntypedType("char", kind,1,0,0, - 1,0,0, NULL_EXPR(),"",0,TYPE_CHAR()) + <+ ? CHARACTER() ; ! SgUntypedType("char", NULL_EXPR(),0,0,0, + 1,0,0, kind,"",1,TYPE_CHAR()) /* kind actually length here */ //R201 fast-to-sage: Program(units) @@ -310,6 +311,8 @@ fast-to-sage: DOUBLEPRECISION() -> DOUBLE fast-to-sage: COMPLEX() -> COMPLEX() fast-to-sage: COMPLEX(kind) -> COMPLEX() +fast-to-sage: DOUBLECOMPLEX() -> DOUBLECOMPLEX() + fast-to-sage: LOGICAL() -> LOGICAL() fast-to-sage: LOGICAL(kind) -> LOGICAL()