public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47915] New: Type declaration: Recursive specification expression not detected.
@ 2011-02-27 17:12 burnus at gcc dot gnu.org
  2013-06-15 11:22 ` [Bug fortran/47915] " dominiq at lps dot ens.fr
  0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-27 17:12 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Type declaration: Recursive specification expression
                    not detected.
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Based on
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/8c8effead3390ad2

The following is invalid as the LEN= specification expression is circular and
-- with the "+1" in LEN not possible.

(I think without "+1" it might work as the implicit typing has len=1, which is
then used to type "a" which can then used for "b" and which then matches the
initial value of 1. It is probably still invalid, but at least not
contradictory.)

>From the standard:

"A variable in a specification expression shall have its type and type
parameters, if any, specified by a previous declaration in the same
scoping unit, by the implicit typing rules in effect for the scoping
unit, or by host or use association. If a variable in a specification
expression is typed by the implicit typing rules, its appearance in any
subsequent type declaration statement shall confirm the implied type and
type parameters." (F2008, 7.1.11 Specification expression)

Test case - only g95 complains:

Error: Circular specification in variable 'a' at (1)

gfortran accepts it even with -std=f95

  subroutine foo(a, b)
    implicit character (A-Z)
    character(len=len(b)+1) :: a
    character(len=len(a)+1) :: b 
  end


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

* [Bug fortran/47915] Type declaration: Recursive specification expression not detected.
  2011-02-27 17:12 [Bug fortran/47915] New: Type declaration: Recursive specification expression not detected burnus at gcc dot gnu.org
@ 2013-06-15 11:22 ` dominiq at lps dot ens.fr
  0 siblings, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-15 11:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-06-15
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
STill present at revision 200122.


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

end of thread, other threads:[~2013-06-15 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-27 17:12 [Bug fortran/47915] New: Type declaration: Recursive specification expression not detected burnus at gcc dot gnu.org
2013-06-15 11:22 ` [Bug fortran/47915] " dominiq at lps dot ens.fr

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