public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54788] New: ICE on pointer-array element assignment
@ 2012-10-02 21:48 slayoo at staszic dot waw.pl
  2012-10-03  0:02 ` [Bug fortran/54788] " janus at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: slayoo at staszic dot waw.pl @ 2012-10-02 21:48 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54788
           Summary: ICE on pointer-array element assignment
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: slayoo@staszic.waw.pl


Hello,

I'm sending below a short code causing an ICE of gfortran.

HTH,
Sylwester

P.S. BTW, could you help me in understanding the following error message:
$ cat question.f90
program question
  type :: arr_t
    real, pointer :: arr(:,:)
  end type
  class(arr_t), pointer :: vec(:)
  allocate(vec(2))
  allocate(vec(0)%arr(4,4))
  vec(1) => vec(0)
end

$ gfortran question.f90 
question.f90:8.2:

  vec(1) => vec(0)
  1
Error: Expected bounds specification for 'vec' at (1)

In principle, I'm trying to define a vector of pointers to arrays, and make two
elements of this vector point to the same array. 

----------------------------------------------------------------------
$ cat bug.f90 
program bug
  integer, pointer :: a(:)
  integer :: b
  allocate(a(0:0))
  a(0:0) => b
end

$ /usr/lib/gcc-snapshot/bin/gfortran bug.f90 
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.

$ /usr/lib/gcc-snapshot/bin/gfortran --version
GNU Fortran (Debian 20120930-1) 4.8.0 20120930 (experimental) [trunk revision
191865]
Copyright (C) 2012 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING


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

end of thread, other threads:[~2013-07-01  8:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-02 21:48 [Bug fortran/54788] New: ICE on pointer-array element assignment slayoo at staszic dot waw.pl
2012-10-03  0:02 ` [Bug fortran/54788] " janus at gcc dot gnu.org
2012-10-03  7:33 ` burnus at gcc dot gnu.org
2012-10-03  9:14 ` burnus at gcc dot gnu.org
2012-10-03 10:45 ` slayoo at staszic dot waw.pl
2012-10-09 18:58 ` slayoo at staszic dot waw.pl
2013-06-27  9:17 ` dominiq at lps dot ens.fr
2013-07-01  8:01 ` burnus at gcc dot gnu.org
2013-07-01  8:13 ` 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).