public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/60509] New: Passing an array of derived type gives wrong boundaries when using 'class'
@ 2014-03-12 11:45 a.vogt at fulguritus dot com
  2014-03-13 13:35 ` [Bug fortran/60509] [OOP] " janus at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: a.vogt at fulguritus dot com @ 2014-03-12 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60509
           Summary: Passing an array of derived type gives wrong
                    boundaries when using 'class'
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: a.vogt at fulguritus dot com

Created attachment 32340
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32340&action=edit
Sample code

When passing an array of derived type variables to a procedure, I get wrong the
wrong results from lbound and ubound when the array is declared as
class(myType). 

Using type(myType) is working as expected. An example is attached. 

I'm using:

gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-isl=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install
--with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC)


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

* [Bug fortran/60509] [OOP] Passing an array of derived type gives wrong boundaries when using 'class'
  2014-03-12 11:45 [Bug fortran/60509] New: Passing an array of derived type gives wrong boundaries when using 'class' a.vogt at fulguritus dot com
@ 2014-03-13 13:35 ` janus at gcc dot gnu.org
  2014-03-13 20:47 ` a.vogt at fulguritus dot com
  2014-03-13 22:41 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2014-03-13 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-13
                 CC|                            |janus at gcc dot gnu.org
            Summary|Passing an array of derived |[OOP] Passing an array of
                   |type gives wrong boundaries |derived type gives wrong
                   |when using 'class'          |boundaries when using
                   |                            |'class'
     Ever confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org ---
Confirmed. Also happens with trunk. I think it's a duplicate of PR 60322.


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

* [Bug fortran/60509] [OOP] Passing an array of derived type gives wrong boundaries when using 'class'
  2014-03-12 11:45 [Bug fortran/60509] New: Passing an array of derived type gives wrong boundaries when using 'class' a.vogt at fulguritus dot com
  2014-03-13 13:35 ` [Bug fortran/60509] [OOP] " janus at gcc dot gnu.org
@ 2014-03-13 20:47 ` a.vogt at fulguritus dot com
  2014-03-13 22:41 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: a.vogt at fulguritus dot com @ 2014-03-13 20:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Alexander Vogt <a.vogt at fulguritus dot com> ---
Sorry, I did not see the other bug report... I agree - it is a duplicate!


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

* [Bug fortran/60509] [OOP] Passing an array of derived type gives wrong boundaries when using 'class'
  2014-03-12 11:45 [Bug fortran/60509] New: Passing an array of derived type gives wrong boundaries when using 'class' a.vogt at fulguritus dot com
  2014-03-13 13:35 ` [Bug fortran/60509] [OOP] " janus at gcc dot gnu.org
  2014-03-13 20:47 ` a.vogt at fulguritus dot com
@ 2014-03-13 22:41 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-03-13 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> > Confirmed. Also happens with trunk. I think it's a duplicate of PR 60322.
>
> Sorry, I did not see the other bug report... I agree - it is a duplicate!

No problem; marking as duplicate.

*** This bug has been marked as a duplicate of bug 60322 ***


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

end of thread, other threads:[~2014-03-13 22:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-12 11:45 [Bug fortran/60509] New: Passing an array of derived type gives wrong boundaries when using 'class' a.vogt at fulguritus dot com
2014-03-13 13:35 ` [Bug fortran/60509] [OOP] " janus at gcc dot gnu.org
2014-03-13 20:47 ` a.vogt at fulguritus dot com
2014-03-13 22:41 ` 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).