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 fortran/36795] crash with character allocatable array argument



------- Comment #1 from burnus at gcc dot gnu dot org  2008-07-11 06:00 -------
The problem is:
   call foo((xx),xx)

gfortran simplifies the "(xx)" to "xx" by passing (-fdump-tree-orignal):
  foo (&xx, &xx, 10, 10);

Since the second argument is nullified in "foo" as it is INTENT(OUT), it is
obvious that accessing the first argument causes a crash.

NAG f95 solves this by creating a temporary for "(xx)" - as does g95.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code


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


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