public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54778] New: an ICE on invalid OO code
@ 2012-10-02  9:50 slayoo at staszic dot waw.pl
  2012-10-02 16:13 ` [Bug fortran/54778] [OOP] " janus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: slayoo at staszic dot waw.pl @ 2012-10-02  9:50 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54778
           Summary: an ICE on invalid OO code
    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


Hi, 

Enclosing below the steps to reproduce an ICE on an invalid OO code.

HTH,
Sylwester



$ cat bug.f95 
module bug_m
  implicit none

  type :: arr_t
    real, dimension(:,:), pointer :: at
  end type

  type :: bug_t
    class(arr_t), allocatable :: elements(:)
  end type

  contains

  function elem(this, i)
    type(bug_t), intent(in) :: this
    integer, intent(in) :: i
    class(arr_t) :: elem
    elem = this%elements(i)
  end function
end module

$ /usr/lib/gcc-snapshot/bin/gfortran bug.f95 
bug.f95:14.2:

  function elem(this, i)
  1
Error: CLASS variable 'elem' at (1) must be dummy, allocatable or pointer
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] 6+ messages in thread

end of thread, other threads:[~2012-10-02 21:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-02  9:50 [Bug fortran/54778] New: an ICE on invalid OO code slayoo at staszic dot waw.pl
2012-10-02 16:13 ` [Bug fortran/54778] [OOP] " janus at gcc dot gnu.org
2012-10-02 19:00 ` janus at gcc dot gnu.org
2012-10-02 19:31 ` janus at gcc dot gnu.org
2012-10-02 21:02 ` janus at gcc dot gnu.org
2012-10-02 21:07 ` janus 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).