public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "valeryweber at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/55427] New: ICE class pointer
Date: Wed, 21 Nov 2012 14:41:00 -0000	[thread overview]
Message-ID: <bug-55427-4@http.gcc.gnu.org/bugzilla/> (raw)


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

             Bug #: 55427
           Summary: ICE class pointer
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: valeryweber@hotmail.com


Dear All

Is that known?

gcc version 4.8.0 20121121 (experimental) (GCC) 

Valery

!>>>>>>>
MODULE base_types
  IMPLICIT NONE
  TYPE :: base_type
  END TYPE base_type
  TYPE, extends( base_type ) :: integer_type
     integer :: i
  END TYPE integer_type
contains
  FUNCTION points_to ( this ) RESULT( reslt )
    CLASS( base_type ), DIMENSION( : ), TARGET :: this
    CLASS( base_type ), DIMENSION( : ), POINTER :: reslt
    reslt => this
  END FUNCTION points_to
END MODULE base_types

program bug
  use base_types
  implicit none
  CLASS( base_type ), POINTER, DIMENSION( : ) :: reslt
  CLASS( base_type ), ALLOCATABLE, DIMENSION( : ) :: val
  type(integer_type) :: i
  i%i=12345
  ALLOCATE( val(10), source=i )
  reslt => points_to ( val )
  write(*,*) associated(reslt)
  select type( p=> reslt )
  type is(integer_type)
     write(*,*) 'p=',p(2)%i
  class default
     stop 666
  end select
end program bug
!=========
 gfortran-trunk bug4.f90 
bug4.f90: In function ‘bug’:
bug4.f90:24:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1857
   reslt => points_to ( val )
 ^
0x83cb322 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc-trunk/gcc/fold-const.c:1856
0x81eff63 gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*)
        ../../gcc-trunk/gcc/fortran/trans-expr.c:6350
0x81f34a5 gfc_trans_class_assign(gfc_expr*, gfc_expr*, gfc_exec_op)
        ../../gcc-trunk/gcc/fortran/trans-expr.c:888
0x81b1dda trans_code
        ../../gcc-trunk/gcc/fortran/trans.c:1322
0x81dcf17 gfc_generate_function_code(gfc_namespace*)
        ../../gcc-trunk/gcc/fortran/trans-decl.c:5349
0x816f1c5 translate_all_program_units
        ../../gcc-trunk/gcc/fortran/parse.c:4467
0x816f1c5 gfc_parse_file()
        ../../gcc-trunk/gcc/fortran/parse.c:4681
0x81acbca gfc_be_parse_file
        ../../gcc-trunk/gcc/fortran/f95-lang.c:191
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

!<<<<<<<<<


             reply	other threads:[~2012-11-21 14:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 14:41 valeryweber at hotmail dot com [this message]
2012-11-21 16:53 ` [Bug fortran/55427] [OOP] ICE with class-array-pointer result janus at gcc dot gnu.org
2012-11-21 18:45 ` burnus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-55427-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).