On 07/15/2011 10:34 PM, Nathan Froyd wrote:
+static void
+runtime_error (int error, const char *message, ...)
+{
+ va_list ap;
+ fprintf (stderr, "Fortran runtime error on image %d: ", caf_this_image);
+ va_start (ap, message);
+ fprintf (stderr, message, ap);
Did you mean to call vfprintf here? (And I guess the recent patches for
the CAF support need to be changed accordingly as well...)
Yeah, it definitely looks like the last fpritnf should have been a
vfprintf. I am officially submitting the attached patch, with the
ChangeLog below. I am currently compiling and I'll run the test suite.
So if I can get a "yay" from one of the developers I'll commit after the
test suite is done.
2011-07-15 Daniel Carrera <dcarr...@gmail.com>
* caf/mpi.c (caf_runtime_error): Change fprintf to vfprintf.
* caf/single.c (caf_runtime_error): Ditto.
Cheers,
Daniel.
--
I'm not overweight, I'm undertall.
diff --git a/libgfortran/caf/mpi.c b/libgfortran/caf/mpi.c
--- a/libgfortran/caf/mpi.c
+++ b/libgfortran/caf/mpi.c
@@ -54,7 +54,7 @@ caf_runtime_error (const char *message,
va_list ap;
fprintf (stderr, "Fortran runtime error on image %d: ", caf_this_image);
va_start (ap, message);
- fprintf (stderr, message, ap);
+ vfprintf (stderr, message, ap);
va_end (ap);
fprintf (stderr, "\n");
diff --git a/libgfortran/caf/single.c b/libgfortran/caf/single.c
--- a/libgfortran/caf/single.c
+++ b/libgfortran/caf/single.c
@@ -48,7 +48,7 @@ caf_runtime_error (const char *message,
va_list ap;
fprintf (stderr, "Fortran runtime error: ");
va_start (ap, message);
- fprintf (stderr, message, ap);
+ vfprintf (stderr, message, ap);
va_end (ap);
fprintf (stderr, "\n");