rs6000_output_function_epilogue performs a series of string comparisons
on language_string, with a
gcc_unreachable ();
if the language_string is unrecognized.
This leads to failure of any attempt to use libgccjit on rs6000, since
jit/dummy-frontend.c has:
#define LANG_HOOKS_NAME "libgccjit"
The attached patch adds support for this lang hook name, using 0 for the
language type.
Takes jit.sum from:
# of expected passes 1417
# of unexpected failures 30
to:
# of expected passes 3428
# of unexpected failures 6
(am investigating the other failures)
OK for trunk?
gcc/ChangeLog
* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
Support the JIT by using 0 as the language type.
---
gcc/config/rs6000/rs6000.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 80fcd65..d076656 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -25491,11 +25491,12 @@ rs6000_output_function_epilogue (FILE *file,
use language_string.
C is 0. Fortran is 1. Pascal is 2. Ada is 3. C++ is 9.
Java is 13. Objective-C is 14. Objective-C++ isn't assigned
- a number, so for now use 9. LTO and Go aren't assigned numbers
+ a number, so for now use 9. LTO, Go and JIT aren't assigned numbers
either, so for now use 0. */
if (lang_GNU_C ()
|| ! strcmp (language_string, "GNU GIMPLE")
- || ! strcmp (language_string, "GNU Go"))
+ || ! strcmp (language_string, "GNU Go")
+ || ! strcmp (language_string, "libgccjit"))
i = 0;
else if (! strcmp (language_string, "GNU F77")
|| ! strcmp (language_string, "GNU Fortran"))
--
1.8.1.4