public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/65223] New: Regresion on elemental type-bound procedure's passed object with INTENT(OUT)
@ 2015-02-26 17:33 jwmwalrus at gmail dot com
  2015-02-27 10:45 ` [Bug fortran/65223] " dominiq at lps dot ens.fr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jwmwalrus at gmail dot com @ 2015-02-26 17:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65223
           Summary: Regresion on elemental type-bound procedure's passed
                    object with INTENT(OUT)
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jwmwalrus at gmail dot com

The code below compiles just fine with gfortran 4.9, but throws an error with
gfortran 5.0:

module storage_mod
    implicit none
    private
    save

    type, public :: StorageClass
        character(20) :: name = 'default'
    contains
        procedure :: destroy => destroyStorage
    end type
contains
    elemental subroutine destroyStorage(this)
        class(StorageClass), intent(OUT) :: this
    end subroutine
end module storage_mod



The output I get is:

$ ll `which gfortran`
lrwxrwxrwx 1 root root 12 Oct 18 04:03 /usr/bin/gfortran -> gfortran-4.9*
$ gfortran -c storage_mod.f90 
$ gfortran-5.0 -c storage_mod.f90 
storage_mod.f90:12:44:

     elemental subroutine destroyStorage(this)
                                            1
Error: INTENT(OUT) argument 'this' of pure procedure 'destroystorage' at (1)
may not be polymorphic



The error goes away by removing the ELEMENTAL attribute, so it seems like a
regression on valid code.

The compiler and system information is:

$ lsb_release -rd
Description:    Debian GNU/Linux 8.0 (jessie)
Release:    8.0

$ gfortran-5.0 -v
Using built-in specs.
COLLECT_GCC=gfortran-5.0
COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20150211-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++
--prefix=/usr/lib/gcc-snapshot --enable-shared --enable-linker-build-id
--disable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=c++98
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5.0-snap-amd64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5.0-snap-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5.0-snap-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--disable-werror --enable-checking=yes --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.0.0 20150211 (experimental) [trunk revision 220605] (Debian
20150211-1)


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

end of thread, other threads:[~2015-10-10 15:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 17:33 [Bug fortran/65223] New: Regresion on elemental type-bound procedure's passed object with INTENT(OUT) jwmwalrus at gmail dot com
2015-02-27 10:45 ` [Bug fortran/65223] " dominiq at lps dot ens.fr
2015-02-27 15:13 ` jwmwalrus at gmail dot com
2015-02-27 15:31 ` dominiq at lps dot ens.fr
2015-10-10 14:53 ` [Bug fortran/65223] Elemental type-bound procedure's passed object with INTENT(OUT) should be accepted with -std=f2003 (?) dominiq at lps dot ens.fr
2015-10-10 15:08 ` 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).