public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/68053] New: lower bound of implied shape array restricted too much
@ 2015-10-22 17:10 gerhard.steinmetz.fortran@t-online.de
  2015-10-22 17:12 ` [Bug fortran/68053] " gerhard.steinmetz.fortran@t-online.de
  2015-10-24 12:58 ` dominiq at lps dot ens.fr
  0 siblings, 2 replies; 3+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-22 17:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 68053
           Summary: lower bound of implied shape array restricted too much
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

There is yet another issue. Now marked as error,
but a specification-expr is allowed in every "lower-bound:*".


$ cat z1x.f90
program p
   integer, parameter :: n(1) = -1
   integer, parameter :: x(1) = 7
   integer, parameter :: z(n(1):*) = x
end


$ cat z2x.f90
program p
   integer, parameter :: n(2) = -1
   integer, parameter :: x(1, 2) = 7
   integer, parameter :: z(n(1):*, n(2):*) = x
end


$ gfortran -g -O0 -Wall -fcheck=all z1x.f90
z1x.f90:4:27:

    integer, parameter :: z(n(1):*) = x
                           1
Error: Non-constant lower bound in implied-shape declaration at (1)


$ gfortran -g -O0 -Wall -fcheck=all z2x.f90
z2x.f90:4:27:

    integer, parameter :: z(n(1):*, n(2):*) = x
                           1
Error: Non-constant lower bound in implied-shape declaration at (1)


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

* [Bug fortran/68053] lower bound of implied shape array restricted too much
  2015-10-22 17:10 [Bug fortran/68053] New: lower bound of implied shape array restricted too much gerhard.steinmetz.fortran@t-online.de
@ 2015-10-22 17:12 ` gerhard.steinmetz.fortran@t-online.de
  2015-10-24 12:58 ` dominiq at lps dot ens.fr
  1 sibling, 0 replies; 3+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-22 17:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Accepted and correct, if scalar parameter n is used instead :


$ cat z1s.f90
program p
   integer, parameter :: n = -1
   integer, parameter :: x(1) = 7
   integer, parameter :: z(n:*) = x
   print *, z
end


$ cat z2s.f90
program p
   integer, parameter :: n = -1
   integer, parameter :: x(1, 2) = 7
   integer, parameter :: z(n:*, n:*) = x
   print *, z
end


$ gfortran -g -O0 -Wall -fcheck=all z1s.f90
$ a.out
           7

$ gfortran -g -O0 -Wall -fcheck=all z2s.f90
$ a.out
           7           7


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

* [Bug fortran/68053] lower bound of implied shape array restricted too much
  2015-10-22 17:10 [Bug fortran/68053] New: lower bound of implied shape array restricted too much gerhard.steinmetz.fortran@t-online.de
  2015-10-22 17:12 ` [Bug fortran/68053] " gerhard.steinmetz.fortran@t-online.de
@ 2015-10-24 12:58 ` dominiq at lps dot ens.fr
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-24 12:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-24
     Ever confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed from 4.8 up to trunk (6.0).


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

end of thread, other threads:[~2015-10-24 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-22 17:10 [Bug fortran/68053] New: lower bound of implied shape array restricted too much gerhard.steinmetz.fortran@t-online.de
2015-10-22 17:12 ` [Bug fortran/68053] " gerhard.steinmetz.fortran@t-online.de
2015-10-24 12:58 ` 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).