public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36534]  New: Bogus: '__convert_s1_s4' at (1) is obsolescent in fortran 95
@ 2008-06-13 21:34 burnus at gcc dot gnu dot org
  2008-06-13 23:06 ` [Bug fortran/36534] " fxcoudert at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-06-13 21:34 UTC (permalink / raw)
  To: gcc-bugs

Found via a typo and missing -pedantic in
gfortran.dg/parameter_array_init_4.f90

$ gfortran -pedantic gfortran.dg/parameter_array_init_4.f90
parameter_array_init_4.f90:18.45:

PARAMETER ( MY_STRING4 = (/ "A" , "B", "C" /) )
                                            1
Warning: CHARACTER(*) function '__convert_s1_s4' at (1) is obsolescent in
fortran 95

Expected: No warning message for internal functions.


See resolve.c:

  if (sym->attr.function
      && sym->ts.type == BT_CHARACTER
      && sym->ts.cl && sym->ts.cl->length == NULL)
    {
[...]
      /* Appendix B.2 of the standard.  Contained functions give an
         error anyway.  Fixed-form is likely to be F77/legacy.  */
      if (!sym->attr.contained && gfc_current_form != FORM_FIXED)
        gfc_notify_std (GFC_STD_F95_OBS, "CHARACTER(*) function "
                        "'%s' at %L is obsolescent in fortran 95",
                        sym->name, &sym->declared_at);

Test case:

CHARACTER (kind=4,len=*) MY_STRING4(1:3), my_string_s4
PARAMETER ( MY_STRING4 = (/ "A" , "B", "C" /) )


-- 
           Summary: Bogus: '__convert_s1_s4' at (1) is obsolescent in
                    fortran 95
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 17+ messages in thread
[parent not found: <bug-36534-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-10-04 10:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-13 21:34 [Bug fortran/36534] New: Bogus: '__convert_s1_s4' at (1) is obsolescent in fortran 95 burnus at gcc dot gnu dot org
2008-06-13 23:06 ` [Bug fortran/36534] " fxcoudert at gcc dot gnu dot org
2008-06-14  5:15 ` jvdelisle at gcc dot gnu dot org
2008-07-09 22:56 ` fxcoudert at gcc dot gnu dot org
2008-07-18 13:29 ` burnus at gcc dot gnu dot org
2008-08-23  8:15 ` fxcoudert at gcc dot gnu dot org
2008-08-24 10:39 ` burnus at gcc dot gnu dot org
2009-12-05  6:56 ` jvdelisle at gcc dot gnu dot org
2009-12-05 18:28 ` tkoenig at gcc dot gnu dot org
2009-12-05 18:54 ` burnus at gcc dot gnu dot org
2009-12-06  0:16 ` jvdelisle at gcc dot gnu dot org
2009-12-06  1:03 ` jvdelisle at gcc dot gnu dot org
2010-04-13  4:31 ` jvdelisle at gcc dot gnu dot org
2010-05-02 14:31 ` dfranke at gcc dot gnu dot org
     [not found] <bug-36534-4@http.gcc.gnu.org/bugzilla/>
2014-09-27 15:22 ` fxcoudert at gcc dot gnu.org
2014-09-29  8:33 ` fxcoudert at gcc dot gnu.org
2014-10-04 10:19 ` fxcoudert 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).