public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67972] New: Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646
@ 2015-10-15  9:17 alexandros.syrakos at outlook dot com
  2015-10-15  9:31 ` [Bug fortran/67972] " dominiq at lps dot ens.fr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: alexandros.syrakos at outlook dot com @ 2015-10-15  9:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67972

            Bug ID: 67972
           Summary: Substrings of arrays of unicode strings are of type
                    DEFAULT rather than ISO_10646
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alexandros.syrakos at outlook dot com
  Target Milestone: ---

This seems related to bug 65141, but it is different so I submit it as a
separate bug. It appears that substrings of arrays of unicode strings are
always treated as of DEFAULT kind. The following code demonstrates this (I'm
using gfortran 5.2.0 on Kubuntu 14.04):

program test
use iso_fortran_env
implicit none
integer, parameter ::ucs4 = selected_char_kind( 'ISO_10646' )
character(kind=ucs4) :: a
character(kind=ucs4, len=8), dimension(2) :: page

a = ucs4_"U"
open (output_unit, encoding='UTF-8')
print "(a,i0)", "kind(page(1)(2:4)) is ", kind(page(1)(2:4))

page(1) = repeat(a,8)
print "(a,i0,2a)", "kind(page(1)) is ", kind(page(1)), "; page(1) is: ",
page(1)

page(1)(2:4) = a
print "(a,i0,2a)", "kind(page(1)) is ", kind(page(1)), "; page(1) is: ",
page(1)
end program test



The reason I used the variable "a" is to avoid assigning directly a constant to
the substring, something that would change the type to DEFAULT anyway,
according to bug 65141. The code demonstrates that page(1) treated as a whole
(as in page(1) = repeat(a,8)) causes no problems, but when a substring is
referenced (page(1)(2:4) = a), page(1) is made to contain garbage characters.
This makes arrays of unicode strings practically unusable.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/67972] Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646
  2015-10-15  9:17 [Bug fortran/67972] New: Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646 alexandros.syrakos at outlook dot com
@ 2015-10-15  9:31 ` dominiq at lps dot ens.fr
  2021-09-11 20:00 ` anlauf at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-15  9:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67972

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-15
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.5, 4.9.3, 5.2.0, 6.0

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed from 4.8 up to trunk (6.0).


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/67972] Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646
  2015-10-15  9:17 [Bug fortran/67972] New: Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646 alexandros.syrakos at outlook dot com
  2015-10-15  9:31 ` [Bug fortran/67972] " dominiq at lps dot ens.fr
@ 2021-09-11 20:00 ` anlauf at gcc dot gnu.org
  2021-10-10 19:52 ` anlauf at gcc dot gnu.org
  2024-01-05 19:57 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-09-11 20:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67972

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |11.2.1, 12.0
      Known to fail|                            |10.3.1
             Status|NEW                         |WAITING

--- Comment #2 from anlauf at gcc dot gnu.org ---
This appears to have been fixed at some point.  12-trunk and 11-branch
work for me as of today, while 10-branch still shows the corruption.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/67972] Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646
  2015-10-15  9:17 [Bug fortran/67972] New: Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646 alexandros.syrakos at outlook dot com
  2015-10-15  9:31 ` [Bug fortran/67972] " dominiq at lps dot ens.fr
  2021-09-11 20:00 ` anlauf at gcc dot gnu.org
@ 2021-10-10 19:52 ` anlauf at gcc dot gnu.org
  2024-01-05 19:57 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-10-10 19:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67972

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zbeekman at gmail dot com

--- Comment #3 from anlauf at gcc dot gnu.org ---
*** Bug 65141 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug fortran/67972] Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646
  2015-10-15  9:17 [Bug fortran/67972] New: Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646 alexandros.syrakos at outlook dot com
                   ` (2 preceding siblings ...)
  2021-10-10 19:52 ` anlauf at gcc dot gnu.org
@ 2024-01-05 19:57 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-01-05 19:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67972

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|WAITING                     |RESOLVED
   Target Milestone|---                         |11.3
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #4 from anlauf at gcc dot gnu.org ---
Definitely fixed long ago before 11.3.  Closing.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-05 19:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-15  9:17 [Bug fortran/67972] New: Substrings of arrays of unicode strings are of type DEFAULT rather than ISO_10646 alexandros.syrakos at outlook dot com
2015-10-15  9:31 ` [Bug fortran/67972] " dominiq at lps dot ens.fr
2021-09-11 20:00 ` anlauf at gcc dot gnu.org
2021-10-10 19:52 ` anlauf at gcc dot gnu.org
2024-01-05 19:57 ` anlauf at gcc dot gnu.org

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).