public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/49565] character(kind=4) is emitted as DW_ATE_unsigned, not DW_ATE_unsigned_char Date: Tue, 28 Jun 2011 16:45:00 -0000 [thread overview] Message-ID: <bug-49565-4-v1bPttVnAz@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-49565-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49565 --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-28 16:45:35 UTC --- There are two issues: a) The one mentioned by Jakub for the committal cited in comment 1 That seems to be a DWARF bug - and Tromey has now filled an issue; it should show up in a while at http://www.dwarfstd.org/Issues.php The problem is that DW_TAG_string_type does not support DW_AT_type, which makes it not suitable for character(kind=4) [as it already has to handle character(kind=1)]. b) Independent of that issue, GCC should emit DW_ATE_unsigned_char and not DW_ATE_unsigned The latter issue seems to come due to the following code in gen_array_type_die: if (TYPE_STRING_FLAG (type) /* Case handling kind=1 characters. */ { ... return; } ... /* For Fortran multidimensional arrays use DW_ORD_col_major ordering. */ if (is_fortran () && TREE_CODE (type) == ARRAY_TYPE && TREE_CODE (TREE_TYPE (type)) == ARRAY_TYPE && !TYPE_STRING_FLAG (TREE_TYPE (type))) add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_col_major); This test is true as: (gdb) p type->type_common.string_flag $6 = 1 (gdb) p type->typed.type->type_common.string_flag $7 = 0 I wonder whether the && !TYPE_STRING_FLAG (TREE_TYPE (type))) shouldn't be instead a && !TYPE_STRING_FLAG (type)) Or alternatively, whether fortran/trans-type.c's gfc_get_character_type_len_for_eltype should not only set TYPE_STRING_FLAG (type) = 1; but also TYPE_STRING_FLAG (TREE_TYPE (type)) = 1;
next prev parent reply other threads:[~2011-06-28 16:45 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-28 15:55 [Bug fortran/49565] New: " tromey at gcc dot gnu.org 2011-06-28 16:08 ` [Bug fortran/49565] " burnus at gcc dot gnu.org 2011-06-28 16:45 ` burnus at gcc dot gnu.org [this message] 2011-06-28 16:55 ` burnus at gcc dot gnu.org 2012-04-16 22:04 ` burnus at gcc dot gnu.org 2013-03-15 17:50 ` burnus at gcc dot gnu.org 2015-10-20 21:54 ` dominiq at lps dot ens.fr 2024-03-20 21:54 ` anlauf at gcc dot gnu.org 2024-03-21 2:57 ` tromey at gcc dot gnu.org 2024-03-21 18:35 ` anlauf at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-49565-4-v1bPttVnAz@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).