The AIX traceback table documentation states the tbtab "lang" field for
Cobol should be set to 7.

Tested on powerpc64le-linux.  There are "new" FAILs with the patch (see below)
on the Cobol test cases, but that is a good thing, because without the
patch, the compiler ICEs and none of the tests are even run making them
essentially unsupported.

The FAILs below are due to PR119597 and are only hit when compiling with -O0.
The -O[123s] Cobol tests all PASS.  That is an improvement to me over the
current status, so I'm treating this patch as "obvious" and will push it
tomorrow unless someone has an objection.

Peter


gcc/
        PR target/119308
        * config/rs6000/rs6000-logue.cc (rs6000_output_function_epilogue):
        Handle GCC COBOL for the tbtab lang field.


diff --git a/gcc/config/rs6000/rs6000-logue.cc 
b/gcc/config/rs6000/rs6000-logue.cc
index 52f44b114b0..5377ad6cee6 100644
--- a/gcc/config/rs6000/rs6000-logue.cc
+++ b/gcc/config/rs6000/rs6000-logue.cc
@@ -5351,6 +5351,8 @@ rs6000_output_function_epilogue (FILE *file)
        i = 1;
       else if (! strcmp (language_string, "GNU Ada"))
        i = 3;
+      else if (! strcmp (language_string, "GCC COBOL"))
+       i = 7;
       else if (! strcmp (language_string, "GNU Modula-2"))
        i = 8;
       else if (lang_GNU_CXX ()





+FAIL: cobol.dg/data1.cob   -O0  execution test
+FAIL: cobol.dg/literal1.cob   -O0  execution test
+FAIL: cobol.dg/group1/declarative_1.cob   -O0  execution test
+FAIL: cobol.dg/group1/escape.cob   -O0  execution test
+FAIL: cobol.dg/group2/Complex_EVALUATE__1_.cob   -O0  execution test
+FAIL: cobol.dg/group2/Complex_EVALUATE__2_.cob   -O0  execution test
+FAIL: cobol.dg/group2/EVALUATE_WHEN_NEGATIVE.cob   -O0  execution test
+FAIL: cobol.dg/group2/EVALUATE_doubled_WHEN.cob   -O0  execution test
+FAIL: cobol.dg/group2/EVALUATE_with_WHEN_using_condition-1.cob   -O0  
execution test
+FAIL: cobol.dg/group2/Floating_continuation_indicator__1_.cob   -O0  execution 
test
+FAIL: cobol.dg/group2/IBM_dialect_COMP_redefined_by_POINTER_as_64-bit.cob   
-O0  execution test
+FAIL: cobol.dg/group2/Indicators_______________-____D__.cob   -O0  execution 
test
+FAIL: cobol.dg/group2/MULTIPLY_to_FIX4.cob   -O0  execution test
+FAIL: cobol.dg/group2/PACKED-DECIMAL_basic_comp-3_comp-6__1_.cob   -O0  
execution test
+FAIL: cobol.dg/group2/PACKED-DECIMAL_basic_comp-3_comp-6__2_.cob   -O0  
execution test
+FAIL: cobol.dg/group2/Simple_floating-point_MOVE.cob   -O0  execution test
+FAIL: cobol.dg/group2/Simple_floating-point_VALUE_and_MOVE.cob   -O0  
execution test
+FAIL: cobol.dg/group2/floating-point_ADD_FORMAT_1.cob   -O0  execution test
+FAIL: cobol.dg/group2/floating-point_ADD_FORMAT_2.cob   -O0  execution test
+FAIL: cobol.dg/group2/floating-point_DIVIDE_FORMAT_1.cob   -O0  execution test
+FAIL: cobol.dg/group2/floating-point_DIVIDE_FORMAT_2.cob   -O0  execution test
+FAIL: cobol.dg/group2/floating-point_MULTIPLY_FORMAT_1.cob   -O0  execution 
test
+FAIL: cobol.dg/group2/floating-point_MULTIPLY_FORMAT_2.cob   -O0  execution 
test
+FAIL: cobol.dg/group2/floating-point_SUBTRACT_FORMAT_1.cob   -O0  execution 
test
+FAIL: cobol.dg/group2/floating-point_SUBTRACT_FORMAT_2.cob   -O0  execution 
test
+FAIL: cobol.dg/group2/floating-point_literals.cob   -O0  execution test

Reply via email to