aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@fitzsim.org>2021-05-27 21:55:46 -0400
committerMarc Poulhiès <dkm@kataplop.net>2021-05-28 13:14:49 +0200
commit83c161d0b828b63b2b1a50530c7bea367ec30896 (patch)
treec5491d8f30b73482163d78356267f53a7ac735cc /gcc
parent13f995c199ac61f02dd01c85bd5d33a24fee91bc (diff)
downloadgcc-83c161d0b828b63b2b1a50530c7bea367ec30896.zip
gcc-83c161d0b828b63b2b1a50530c7bea367ec30896.tar.gz
gcc-83c161d0b828b63b2b1a50530c7bea367ec30896.tar.bz2
rs6000: Recognize GNU Rust when producing epilogue
Handling the GNU Rust language when writing a function's epilogue is necessary to avoid an internal compiler error. gcc/ChangeLog: 2021-05-27 Thomas Fitzsimmons <fitzsim@fitzsim.org> Mark Wielaard <mark@klomp.org> * config/rs6000/rs6000-logue.c (rs6000_output_function_epilogue): Set language type field to 0 for GNU Rust. Co-Authored-By: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/rs6000-logue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c
index b0ac183..7da8db6 100644
--- a/gcc/config/rs6000/rs6000-logue.c
+++ b/gcc/config/rs6000/rs6000-logue.c
@@ -5262,12 +5262,13 @@ rs6000_output_function_epilogue (FILE *file)
use language_string.
C is 0. Fortran is 1. Ada is 3. Modula-2 is 8. C++ is 9.
Java is 13. Objective-C is 14. Objective-C++ isn't assigned
- a number, so for now use 9. LTO, Go, D, and JIT aren't assigned
- numbers either, so for now use 0. */
+ a number, so for now use 9. LTO, Go, D, Rust, 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 D")
+ || ! strcmp (language_string, "GNU Rust")
|| ! strcmp (language_string, "libgccjit"))
i = 0;
else if (! strcmp (language_string, "GNU F77")