public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/63667] New: ICE with DEFERRED procedure
@ 2014-10-28 12:30 valeryweber at hotmail dot com
  2014-11-30 12:11 ` [Bug fortran/63667] " dominiq at lps dot ens.fr
  0 siblings, 1 reply; 2+ messages in thread
From: valeryweber at hotmail dot com @ 2014-10-28 12:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63667
           Summary: ICE with DEFERRED procedure
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: valeryweber at hotmail dot com

Hi All

the following (wrong) piece of code is producing an ICE with gcc 4.9.1

v

cat cuba_types.F90
MODULE cubature_types
  IMPLICIT NONE
  PRIVATE
  TYPE, ABSTRACT :: cu_user_function_type
   CONTAINS
     PROCEDURE( cu_user_function_interface ), DEFERRED :: evaluate
  END TYPE cu_user_function_type

  ABSTRACT INTERFACE
     FUNCTION cu_user_function_interface ( this, r ) RESULT( reslt )
       IMPORT :: cu_user_function_type
       CLASS( cu_user_function_type ), INTENT( INOUT ) :: this
       REAL, DIMENSION( : ), INTENT( IN ) :: r
       REAL :: reslt
     END FUNCTION cu_user_function_interface
  END INTERFACE

  TYPE, PUBLIC :: cu_type
     PRIVATE
     LOGICAL :: init = .FALSE.
     CLASS( cu_user_function_type ) :: user_func
   CONTAINS
     PROCEDURE, PASS :: integrate => cu_integrate
  END TYPE cu_type

CONTAINS

  SUBROUTINE cu_integrate ( this )
    CLASS(cu_type), INTENT(INOUT)            :: this
    REAL, DIMENSION(3) :: r
    r = 1.0
    write(*,*) this%user_func%evaluate ( r )
  END SUBROUTINE cu_integrate

END MODULE cubature_types

gfortran-4.9.1 cuba_types.F90
cuba_types.F90:21.48:

     CLASS( cu_user_function_type ) :: user_func
                                                1
Error: Component 'user_func' with CLASS at (1) must be allocatable or pointer
f951: internal compiler error: in check_typebound_baseobject, at
fortran/resolve.c:5369
0x5bb9a8 check_typebound_baseobject
    ../../gcc-4.9.1/gcc/fortran/resolve.c:5369
0x5be5ce resolve_compcall
    ../../gcc-4.9.1/gcc/fortran/resolve.c:5656
0x5b4de2 resolve_typebound_function
    ../../gcc-4.9.1/gcc/fortran/resolve.c:5798
0x5b4de2 gfc_resolve_expr(gfc_expr*)
    ../../gcc-4.9.1/gcc/fortran/resolve.c:6107
0x5bf9ee gfc_resolve_code(gfc_code*, gfc_namespace*)
    ../../gcc-4.9.1/gcc/fortran/resolve.c:9804
0x5c124b gfc_resolve_blocks(gfc_code*, gfc_namespace*)
    ../../gcc-4.9.1/gcc/fortran/resolve.c:9021
0x5beac7 gfc_resolve_code(gfc_code*, gfc_namespace*)
    ../../gcc-4.9.1/gcc/fortran/resolve.c:9794
0x5c140e resolve_codes
    ../../gcc-4.9.1/gcc/fortran/resolve.c:14719
0x5c1317 resolve_codes
    ../../gcc-4.9.1/gcc/fortran/resolve.c:14705
0x5b2385 gfc_resolve
    ../../gcc-4.9.1/gcc/fortran/resolve.c:14747
0x5b2385 gfc_resolve(gfc_namespace*)
    ../../gcc-4.9.1/gcc/fortran/resolve.c:14733
0x5a76ea gfc_parse_file()
    ../../gcc-4.9.1/gcc/fortran/parse.c:5089
0x5e4ca5 gfc_be_parse_file
    ../../gcc-4.9.1/gcc/fortran/f95-lang.c:212
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.

gfortran-4.9.1 --version
GNU Fortran (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.


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

* [Bug fortran/63667] ICE with DEFERRED procedure
  2014-10-28 12:30 [Bug fortran/63667] New: ICE with DEFERRED procedure valeryweber at hotmail dot com
@ 2014-11-30 12:11 ` dominiq at lps dot ens.fr
  0 siblings, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-11-30 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-30
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed on 4.9 and trunk (5.0 r217946). On my working tree the ICE is gone,
i.e., there is a fix in bugzilla for this PR and it is likely a duplicate
(AFAICT Mikael Morin's patch for pr44978).


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28 12:30 [Bug fortran/63667] New: ICE with DEFERRED procedure valeryweber at hotmail dot com
2014-11-30 12:11 ` [Bug fortran/63667] " 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).