re PR fortran/68009 (prototype for gfortran_runtime_error with inline matmul)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 18 Mar 2019 17:35:54 +0000 (17:35 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 18 Mar 2019 17:35:54 +0000 (17:35 +0000)
2019-03-18  Thomas Koenig  <tkoeng@gcc.gnu.org>

PR fortran/68009
* iresolve.c: Include trans.h.
(gfc_resolve_fe_runtine_error): Set backend_decl on
resolved_sym.

From-SVN: r269769

gcc/fortran/ChangeLog
gcc/fortran/iresolve.c

index 8028118c97cef1988a89c554fec871e40831e416..4dd35ec6030cec691563628dd4d6f6e5406ee472 100644 (file)
@@ -1,3 +1,10 @@
+2019-03-18  Thomas Koenig  <tkoeng@gcc.gnu.org>
+
+       PR fortran/68009
+       * iresolve.c: Include trans.h.
+       (gfc_resolve_fe_runtine_error): Set backend_decl on
+       resolved_sym.
+
 2019-03-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/88008
index 135e6bc6920b7652bb6de399f9c0400bef52d4ee..53338dda0a7feace2ae19ad30e9478e068a8aa01 100644 (file)
@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "intrinsic.h"
 #include "constructor.h"
 #include "arith.h"
+#include "trans.h"
 
 /* Given printf-like arguments, return a stable version of the result string.
 
@@ -2495,6 +2496,10 @@ gfc_resolve_fe_runtime_error (gfc_code *c)
     a->name = "%VAL";
 
   c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
+  /* We set the backend_decl here because runtime_error is a
+     variadic function and we would use the wrong calling
+     convention otherwise.  */
+  c->resolved_sym->backend_decl = gfor_fndecl_runtime_error;
 }
 
 void