Skip to content
Snippets Groups Projects

Draft: Fortran Support

3 files
+ 14
6
Compare changes
  • Side-by-side
  • Inline

Files

@@ -38,11 +38,13 @@ type_adjust_fort = {
"signed int": "integer",
"int": "integer",
"double": "double precision",
"_Bool": "logical",
}
elements_adjust_fort = {
"sizeof(signed int)": "int_size",
"sizeof(int)": "int_size",
"sizeof(signed int)": "integer_size",
"sizeof(int)": "integer_size",
"sizeof(double)": "double_size",
"sizeof(_Bool)": "logical_size",
}
class AllocCall(Instruction):
@@ -66,6 +68,8 @@ class AllocCall(Instruction):
@override
def __str__(self):
if infvars.generator_language == "fort" and self._type not in type_adjust_fort:
return "! FORTRAN_INCOMPATIBLE"
if self._use_malloc:
delim = '*'
func = "malloc"
Loading