[PATCH]: Fix some fortran internal error messages
Kaveh R. GHAZI
ghazi@caip.rutgers.edu
Fri Sep 25 01:37:00 GMT 2009
While reading gfortran code, I noticed that some of the error messages
were bogus. Many of the math functions erroneously claim to be cos,
likely as a result of overly aggressive cut-n-paste'ing.
Tested on x86_64-unknown-linux-gnu, no regressions. However I expect
nothing in the testsuite actually triggers these as they should be
impossible conditions.
Okay for mainline?
--Kaveh
2009-09-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* simplify.c (gfc_simplify_acos, gfc_simplify_acosh,
gfc_simplify_asin, gfc_simplify_asinh, gfc_simplify_atan,
gfc_simplify_atanh): Fix error message.
diff -rup orig/egcc-SVN20090920/gcc/fortran/simplify.c egcc-SVN20090920/gcc/fortran/simplify.c
--- orig/egcc-SVN20090920/gcc/fortran/simplify.c 2009-08-14 02:00:48.000000000 +0200
+++ egcc-SVN20090920/gcc/fortran/simplify.c 2009-09-20 19:14:04.000000000 +0200
@@ -749,7 +749,7 @@ gfc_simplify_acos (gfc_expr *x)
case BT_COMPLEX:
return NULL;
default:
- gfc_internal_error ("in gfc_simplify_cos(): Bad type");
+ gfc_internal_error ("in gfc_simplify_acos(): Bad type");
}
result = gfc_constant_result (x->ts.type, x->ts.kind, &x->where);
@@ -783,7 +783,7 @@ gfc_simplify_acosh (gfc_expr *x)
case BT_COMPLEX:
return NULL;
default:
- gfc_internal_error ("in gfc_simplify_cos(): Bad type");
+ gfc_internal_error ("in gfc_simplify_acosh(): Bad type");
}
return range_check (result, "ACOSH");
@@ -1045,7 +1045,7 @@ gfc_simplify_asin (gfc_expr *x)
case BT_COMPLEX:
return NULL;
default:
- gfc_internal_error ("in gfc_simplify_cos(): Bad type");
+ gfc_internal_error ("in gfc_simplify_asin(): Bad type");
}
return range_check (result, "ASIN");
@@ -1069,7 +1069,7 @@ gfc_simplify_asinh (gfc_expr *x)
case BT_COMPLEX:
return NULL;
default:
- gfc_internal_error ("in gfc_simplify_cos(): Bad type");
+ gfc_internal_error ("in gfc_simplify_asinh(): Bad type");
}
return range_check (result, "ASINH");
@@ -1093,7 +1093,7 @@ gfc_simplify_atan (gfc_expr *x)
case BT_COMPLEX:
return NULL;
default:
- gfc_internal_error ("in gfc_simplify_cos(): Bad type");
+ gfc_internal_error ("in gfc_simplify_atan(): Bad type");
}
return range_check (result, "ATAN");
@@ -1125,7 +1125,7 @@ gfc_simplify_atanh (gfc_expr *x)
case BT_COMPLEX:
return NULL;
default:
- gfc_internal_error ("in gfc_simplify_cos(): Bad type");
+ gfc_internal_error ("in gfc_simplify_atanh(): Bad type");
}
return range_check (result, "ATANH");
More information about the Fortran
mailing list