public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/63371] New: kind() with function name (not call) as argument
@ 2014-09-25 15:18 burnus at gcc dot gnu.org
  2014-09-25 15:50 ` [Bug fortran/63371] " dominiq at lps dot ens.fr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2014-09-25 15:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63371
           Summary: kind() with function name (not call) as argument
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

>From https://groups.google.com/forum/#!topic/comp.lang.fortran/lbaOSWKSmhQ

That's either a wrong-code or accepts-invalid issue, it requires some digging.
But the output "0" is surely wrong and if it is valid, it makes only sense for
functions and one has to be careful with generics.

Example, which prints "0" instead of "2". Using a subroutine, it is even
accepted instead of plainly rejected (hence accepts-invalid):


    INTERFACE
       FUNCTION f()
         INTEGER(SELECTED_INT_KIND(4)) :: f
       END FUNCTION f
     END INTERFACE

     PRINT *, KIND(f)
   END

   ! (just to provide a definition)
   FUNCTION f()
     INTEGER(SELECTED_INT_KIND(4)) :: f
   END FUNCTION f


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

* [Bug fortran/63371] kind() with function name (not call) as argument
  2014-09-25 15:18 [Bug fortran/63371] New: kind() with function name (not call) as argument burnus at gcc dot gnu.org
@ 2014-09-25 15:50 ` dominiq at lps dot ens.fr
  2015-02-19  7:50 ` burnus at gcc dot gnu.org
  2015-02-19  7:51 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-09-25 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-09-25
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I get 0 with gfortran from 4.3.1 up to trunk (5.0). Compiling the test with
gfortran 4.3 gives the warning

pr63371.f90: In function 'f':
pr63371.f90:11: warning: Function return value not set


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

* [Bug fortran/63371] kind() with function name (not call) as argument
  2014-09-25 15:18 [Bug fortran/63371] New: kind() with function name (not call) as argument burnus at gcc dot gnu.org
  2014-09-25 15:50 ` [Bug fortran/63371] " dominiq at lps dot ens.fr
@ 2015-02-19  7:50 ` burnus at gcc dot gnu.org
  2015-02-19  7:51 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-02-19  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
See also https://groups.google.com/forum/#!topic/comp.lang.fortran/N3B4ge5XQ40
- and in particular Richard Main's comments therein.


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

* [Bug fortran/63371] kind() with function name (not call) as argument
  2014-09-25 15:18 [Bug fortran/63371] New: kind() with function name (not call) as argument burnus at gcc dot gnu.org
  2014-09-25 15:50 ` [Bug fortran/63371] " dominiq at lps dot ens.fr
  2015-02-19  7:50 ` burnus at gcc dot gnu.org
@ 2015-02-19  7:51 ` burnus at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-02-19  7:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
See also PR 63363, which causes this code to be reject now.


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

end of thread, other threads:[~2015-02-19  7:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-25 15:18 [Bug fortran/63371] New: kind() with function name (not call) as argument burnus at gcc dot gnu.org
2014-09-25 15:50 ` [Bug fortran/63371] " dominiq at lps dot ens.fr
2015-02-19  7:50 ` burnus at gcc dot gnu.org
2015-02-19  7:51 ` burnus 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).