/* Header for code translation functions
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Paul Brook
-This file is part of GNU G95.
+This file is part of GCC.
-GNU G95 is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
-GNU G95 is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
You should have received a copy of the GNU General Public License
-along with GNU G95; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
#ifndef GFC_TRANS_H
#define GFC_TRANS_H
typedef struct
{
tree head;
- int has_scope:1;
+ unsigned int has_scope:1;
}
stmtblock_t;
}
gfc_loopinfo;
+
+/* Information about a symbol that has been shadowed by a temporary. */
+typedef struct
+{
+ symbol_attribute attr;
+ tree decl;
+}
+gfc_saved_var;
+
+
/* Advance the SS chain to the next term. */
void gfc_advance_se_ss_chain (gfc_se *);
/* Return the variable decl for a symbol. */
tree gfc_get_symbol_decl (gfc_symbol *);
+/* Build a static initializer. */
+tree gfc_conv_initializer (gfc_expr *, gfc_typespec *, tree, bool, bool);
+
+/* Substitute a temporary variable in place of the real one. */
+void gfc_shadow_sym (gfc_symbol *, tree, gfc_saved_var *);
+
+/* Restore the original variable. */
+void gfc_restore_sym (gfc_symbol *, gfc_saved_var *);
+
/* Allocate the lang-spcific part of a decl node. */
void gfc_allocate_lang_decl (tree);
tree poplevel (int, int, int);
tree getdecls (void);
tree gfc_truthvalue_conversion (tree);
+tree builtin_function (const char *, tree, int, enum built_in_class,
+ const char *, tree);
/* Runtime library function decls. */
extern GTY(()) tree gfor_fndecl_internal_malloc;
/* Math functions. Many other math functions are handled in
trans-intrinsic.c. */
-extern GTY(()) tree gfor_fndecl_math_powf;
-extern GTY(()) tree gfor_fndecl_math_pow;
+
+typedef struct gfc_powdecl_list GTY(())
+{
+ tree integer;
+ tree real;
+ tree cmplx;
+}
+gfc_powdecl_list;
+
+extern GTY(()) gfc_powdecl_list gfor_fndecl_math_powi[3][2];
extern GTY(()) tree gfor_fndecl_math_cpowf;
extern GTY(()) tree gfor_fndecl_math_cpow;
extern GTY(()) tree gfor_fndecl_math_cabsf;
/* Other misc. runtime library functions. */
extern GTY(()) tree gfor_fndecl_size0;
extern GTY(()) tree gfor_fndecl_size1;
+extern GTY(()) tree gfor_fndecl_iargc;
/* Implemented in FORTRAN. */
extern GTY(()) tree gfor_fndecl_si_kind;