trans-decl.c (gfc_build_intrinsic_function_decls): Mark the pow functions as constant functions.

2006-11-26  Andrew Pinski  <pinskia@gmail.com>

        * trans-decl.c (gfc_build_intrinsic_function_decls): Mark the
        pow functions as constant functions.

From-SVN: r119219
This commit is contained in:
Andrew Pinski 2006-11-26 00:09:05 -08:00 committed by Andrew Pinski
parent fade9a8e43
commit 67fdae36e9
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-11-26 Andrew Pinski <pinskia@gmail.com>
* trans-decl.c (gfc_build_intrinsic_function_decls): Mark the
pow functions as constant functions.
2006-11-25 Andrew Pinski <pinskia@gmail.com>
PR fortran/29982

View File

@ -2112,6 +2112,7 @@ gfc_build_intrinsic_function_decls (void)
gfor_fndecl_math_powi[jkind][ikind].integer =
gfc_build_library_function_decl (get_identifier (name),
jtype, 2, jtype, itype);
TREE_READONLY (gfor_fndecl_math_powi[jkind][ikind].integer) = 1;
}
}
@ -2125,6 +2126,7 @@ gfc_build_intrinsic_function_decls (void)
gfor_fndecl_math_powi[rkind][ikind].real =
gfc_build_library_function_decl (get_identifier (name),
rtype, 2, rtype, itype);
TREE_READONLY (gfor_fndecl_math_powi[rkind][ikind].real) = 1;
}
ctype = gfc_get_complex_type (rkinds[rkind]);
@ -2135,6 +2137,7 @@ gfc_build_intrinsic_function_decls (void)
gfor_fndecl_math_powi[rkind][ikind].cmplx =
gfc_build_library_function_decl (get_identifier (name),
ctype, 2,ctype, itype);
TREE_READONLY (gfor_fndecl_math_powi[rkind][ikind].cmplx) = 1;
}
}
}