OSDN Git Service

2006-11-26 Andrew Pinski <pinskia@gmail.com>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Nov 2006 08:09:05 +0000 (08:09 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 26 Nov 2006 08:09:05 +0000 (08:09 +0000)
        * trans-decl.c (gfc_build_intrinsic_function_decls): Mark the
        pow functions as constant functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119219 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c

index a6a2962..9b350ff 100644 (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
index e44489d..1f3ab7d 100644 (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;
              }
          }
       }