rs6000: Handle Modula-2 in the traceback table
diff mbox series

Message ID 5993e7a39ef09340ceceabf80f2b629881af92e0.1562866573.git.segher@kernel.crashing.org
State New
Headers show
Series
  • rs6000: Handle Modula-2 in the traceback table
Related show

Commit Message

Segher Boessenkool July 11, 2019, 6:34 p.m. UTC
This patch recognises Modula-2 as language for the traceback table,
fixing the problem shown in
https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00848.html .

Committing to trunk, and committing a variant to the 9 branch.


Segher


2019-07-11  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000-logue.c (rs6000_output_function_epilogue):
	Handle Modula-2.

---
 gcc/config/rs6000/rs6000-logue.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Edelsohn July 11, 2019, 6:37 p.m. UTC | #1
On Thu, Jul 11, 2019 at 2:34 PM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> This patch recognises Modula-2 as language for the traceback table,
> fixing the problem shown in
> https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00848.html .

The value "8" is predefined in the ABI and AIX headers as the
"language indicator" for Modula-2.

Okay.

- David

Patch
diff mbox series

diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c
index 8454f96..8e8cf05 100644
--- a/gcc/config/rs6000/rs6000-logue.c
+++ b/gcc/config/rs6000/rs6000-logue.c
@@ -5287,6 +5287,8 @@  rs6000_output_function_epilogue (FILE *file)
 	i = 1;
       else if (! strcmp (language_string, "GNU Ada"))
 	i = 3;
+      else if (! strcmp (language_string, "GNU Modula-2"))
+	i = 8;
       else if (lang_GNU_CXX ()
 	       || ! strcmp (language_string, "GNU Objective-C++"))
 	i = 9;