[Bug libfortran/106295] INQUIRE statement bus error at runtime

2024-03-19 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106295

--- Comment #7 from Jerry DeLisle  ---
I don't think that is a bad idea. I realize that this comes up often enough to
consider some solution.

[Bug libfortran/106295] INQUIRE statement bus error at runtime

2024-03-19 Thread ghlixo at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106295

--- Comment #6 from ghlixo at gmail dot com ---
One last comment about this issue.

I maintain and distribute a Fortran subroutine package to users.  In my
experience, most of them are unaware that Fortran compilers evolve over time,
and that the compiler used to build the subroutine package might not be the
same version that they have installed.

It seems that simple form of link-time version control might alert them to the
problem, and avoid spurious problem reports.  Would not a reference to a symbol
in the run-time library dropped into compiled code when a library routine is
used solve the problem?  If the symbol definition changes when the library
changes, then it would be impossible to link old code with an incompatible
run-time library.

[Bug libfortran/106295] INQUIRE statement bus error at runtime

2024-03-05 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106295

Jerry DeLisle  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 CC||jvdelisle at gcc dot gnu.org
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Jerry DeLisle  ---
I think this should be closed. Dont mix libraries.

[Bug libfortran/106295] INQUIRE statement bus error at runtime

2022-07-14 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106295

--- Comment #4 from anlauf at gcc dot gnu.org ---
I think the fix for PR83036 (INQUIRE specifier NEXTREC is a 4-byte integer,
should be 8), which changed the layout of struct st_parameter_inquire,
could explain what you observe.

I have no solution to your problem other than recommending not doing what
you did: mix vastly different compiler versions with legacy code.  You would
have been warned if you used modern Fortran with modules.

I bet that most other compilers require (recommend or advise) recompilation
of legacy code without explaining in detail which intrinsic might be affected.

[Bug libfortran/106295] INQUIRE statement bus error at runtime

2022-07-14 Thread ghlixo at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106295

--- Comment #3 from ghlixo at gmail dot com ---
That first attachment contains both parts of the code (main, subroutine).  The
later ones are the individual pieces.

[Bug libfortran/106295] INQUIRE statement bus error at runtime

2022-07-14 Thread ghlixo at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106295

--- Comment #2 from ghlixo at gmail dot com ---
Created attachment 53298
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53298=edit
subroutine (to be compiled with older libfortran)

[Bug libfortran/106295] INQUIRE statement bus error at runtime

2022-07-14 Thread ghlixo at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106295

--- Comment #1 from ghlixo at gmail dot com ---
Created attachment 53297
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53297=edit
main program (to be compiled with latest release, e.g. 11.2.0)