This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Emit DW_AT_identifier_case DW_ID_down_case for Fortran compilation units (PR debug/43950)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Fri, 30 Apr 2010 21:25:01 +0200
- Subject: [PATCH] Emit DW_AT_identifier_case DW_ID_down_case for Fortran compilation units (PR debug/43950)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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