This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/80850] Sourced allocate() fails to allocate a pointer


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

--- Comment #11 from DIL <liakhdi at ornl dot gov> ---
The additional problem you observe with gfortran/7.1 described in the comment
"2017-05-26 22:43:21 UTC" seems to be another gfortran compiler bug introduced
in GCC/7.0. I have just filed a bug report for it (#81758). To my current
understanding, it is not related to this (potential) bug report which is
observed with GCC/5.x and GCC/6.x. Also, in the context of the current bug
report, for more convenience I have isolated the problematic section of my code
in a separate few-line procedure that can be found in stsubs.F90 line 275
(function clone_object). I still observe the same wrong behavior: Sourced
allocate() returns "Attempt to allocated and allocated object" on an explicitly
dissociated pointer (meaning allocation status is Unallocated). Additionally, I
ran more tests on different platforms and here is the statistics:
a) The sourced allocation crash I observe is non-deterministic;
b) It is more likely to appear in the "-O0 -g" build than in "-O3";
c) It disappears in GDB;
d) It always crashes on Mac;
e) It crashes ~ 50% of times on Ubuntu Linux;
f) It does not crash on some platforms with RedHat Linux.

The code repo is the same:
https://github.com/DmitryLyakh/GFC.git
or
https://gitlab.com/DmitryLyakh/GFC.git

Any response or comment would be highly appreciated! Thanks.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]