public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64124] New: [F95] Valid constant expr rejected
@ 2014-11-30 12:36 fxcoudert at gcc dot gnu.org
  2014-11-30 12:39 ` [Bug fortran/64124] " fxcoudert at gcc dot gnu.org
  2014-11-30 14:55 ` dominiq at lps dot ens.fr
  0 siblings, 2 replies; 3+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-30 12:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64124
           Summary: [F95] Valid constant expr rejected
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxcoudert at gcc dot gnu.org

$ cat a.f90
  character(len=kind(1)) x
  integer(len(x)) y
  end
$ gfortran a.f90 -std=f95
a.f90:2.14:

  integer(len(x)) y
              1
Error: Parameter 'x' at (1) has not been declared or is a variable, which does
not reduce to a constant expression


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

* [Bug fortran/64124] [F95] Valid constant expr rejected
  2014-11-30 12:36 [Bug fortran/64124] New: [F95] Valid constant expr rejected fxcoudert at gcc dot gnu.org
@ 2014-11-30 12:39 ` fxcoudert at gcc dot gnu.org
  2014-11-30 14:55 ` dominiq at lps dot ens.fr
  1 sibling, 0 replies; 3+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2014-11-30 12:39 UTC (permalink / raw)
  To: gcc-bugs

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-30
             Blocks|                            |32834
     Ever confirmed|0                           |1


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

* [Bug fortran/64124] [F95] Valid constant expr rejected
  2014-11-30 12:36 [Bug fortran/64124] New: [F95] Valid constant expr rejected fxcoudert at gcc dot gnu.org
  2014-11-30 12:39 ` [Bug fortran/64124] " fxcoudert at gcc dot gnu.org
@ 2014-11-30 14:55 ` dominiq at lps dot ens.fr
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-30 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I see the error from 4.4.7 up to trunk (5.0 r218188). The error  goes away if I
replace

  character(len=kind(1)) x

with

  character(len=kind(1)), parameter :: x='abcd'

and gfortran compiles the following code

  character(len=kind(1)) x
  integer y(len(x),len(x))
  print *, shape(y)
  end


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

end of thread, other threads:[~2014-11-30 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-30 12:36 [Bug fortran/64124] New: [F95] Valid constant expr rejected fxcoudert at gcc dot gnu.org
2014-11-30 12:39 ` [Bug fortran/64124] " fxcoudert at gcc dot gnu.org
2014-11-30 14:55 ` 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).