This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Emit DW_AT_identifier_case DW_ID_down_case for Fortran compilation units (PR debug/43950)


Hi!

The fortran FE lowercases all identifiers (and the language is case
insensitive), so we shouldn't use the default DW_AT_identifier_case
DW_ID_case_sensitive for Fortran.

Tested on x86_64-linux.

Ok for trunk?

2010-04-30  Jakub Jelinek  <jakub@redhat.com>

	PR debug/43950
	* dwarf2out.c (gen_compile_unit_die): Add DW_AT_identifier_case
	DW_ID_down_case for Fortran compilation units.

--- gcc/dwarf2out.c.jj	2010-04-30 16:52:09.000000000 +0200
+++ gcc/dwarf2out.c	2010-04-30 21:14:04.000000000 +0200
@@ -18780,6 +18780,20 @@ gen_compile_unit_die (const char *filena
     }
 
   add_AT_unsigned (die, DW_AT_language, language);
+
+  switch (language)
+    {
+    case DW_LANG_Fortran77:
+    case DW_LANG_Fortran90:
+    case DW_LANG_Fortran95:
+      /* Fortran has case insensitive identifiers and the front-end
+	 lowercases everything.  */
+      add_AT_unsigned (die, DW_AT_identifier_case, DW_ID_down_case);
+      break;
+    default:
+      /* The default DW_ID_case_sensitive doesn't need to be specified.  */
+      break;
+    }
   return die;
 }
 

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]