public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/96495] New: [gfortran] MERGE does not copy ALLOCATABLE property of derived type
@ 2020-08-06 13:17 paul.luckner@rwth-aachen.de
  2020-08-11 13:35 ` [Bug fortran/96495] " paul.luckner@rwth-aachen.de
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: paul.luckner@rwth-aachen.de @ 2020-08-06 13:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96495
           Summary: [gfortran] MERGE does not copy ALLOCATABLE property of
                    derived type
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: paul.luckner@rwth-aachen.de
  Target Milestone: ---

Created attachment 49011
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49011&action=edit
proof of concept code

There is a bug in gfortran and I singled out the problem this far:

- a derived type with ALLOCATABLE data 
- a MERGE call
- an operator overloading used as argument to the MERGE call
- ELEMENTAL procedure

it is best to look at the proof of concept codes attached.
There are 4 highlighted code sections which should all yield similar results
but only one works whereas the others are broken.

The bug arises when called using a vector (using the ELEMENTAL feature).

====================
Supplementary information
$ gfortran --version
GNU Fortran (GCC) 10.1.0

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/exports/gcc-10.1.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-10.1.0-source/gcc-10.1.0/configure
--enable-languages=c,c++,fortran --enable-checking=release
--disable-libstdcxx-pch --enable-libgomp --enable-lto --enable-gold
--with-plugin-ld=gold --prefix=/usr/local/gcc-10.1.0
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.1.0 (GCC) 

$ cat /etc/os-release 
NAME="openSUSE Leap"
VERSION="15.1"

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

end of thread, other threads:[~2021-03-12 11:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 13:17 [Bug fortran/96495] New: [gfortran] MERGE does not copy ALLOCATABLE property of derived type paul.luckner@rwth-aachen.de
2020-08-11 13:35 ` [Bug fortran/96495] " paul.luckner@rwth-aachen.de
2020-08-11 13:53 ` paul.luckner@rwth-aachen.de
2020-08-28  9:19 ` [Bug fortran/96495] [gfortran] Composition of user-defined operators " pault at gcc dot gnu.org
2020-08-29 12:04 ` pault at gcc dot gnu.org
2020-09-24 10:52 ` cvs-commit at gcc dot gnu.org
2020-09-26 11:41 ` cvs-commit at gcc dot gnu.org
2020-12-28 12:11 ` pault at gcc dot gnu.org
2021-03-12 11:53 ` marxin 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).