public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39490]  New: Non-standard assignment of arrays of character objects
@ 2009-03-18  9:53 n dot pinhao at netvisao dot pt
  2009-03-18 11:17 ` [Bug fortran/39490] " dominiq at lps dot ens dot fr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: n dot pinhao at netvisao dot pt @ 2009-03-18  9:53 UTC (permalink / raw)
  To: gcc-bugs

gfortran accepts the following syntax for the assignment of character objects:

CHARACTER(14) :: prop(4) = (/'name', 'data_file_name', 'Ho_units',
'mpolar_units'/)

Although this is convenient, is not according to the Fortran standard that
requires that all of the elements of a constructor be the same kind, type and
for characters, length.
According to this the correct syntax is:

CHARACTER(14) :: prop(4) = (/'name          ', 'data_file_name', &
  'Ho_units      ', 'mpolar_units  '/)


-- 
           Summary: Non-standard assignment of arrays of character objects
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: n dot pinhao at netvisao dot pt
 GCC build triplet: Linux, x86_64 and i486
  GCC host triplet: Linux, x86_64 and i486
GCC target triplet: Linux, x86_64 and i486


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39490


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

end of thread, other threads:[~2009-03-28  8:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-18  9:53 [Bug fortran/39490] New: Non-standard assignment of arrays of character objects n dot pinhao at netvisao dot pt
2009-03-18 11:17 ` [Bug fortran/39490] " dominiq at lps dot ens dot fr
2009-03-18 19:13 ` burnus at gcc dot gnu dot org
2009-03-28  8:28 ` [Bug fortran/39490] Invalid character constructor rejected at -std=gnu since 4.4 fxcoudert at gcc dot gnu dot 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).