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

--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Created attachment 39746
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39746&action=edit
One approach to resolving this

With the attached patch, here is the result of trying to go forward or backward
with pointing to the wrong library (usr is current trunk, usr6 is gcc 6)

gfc pr77828.f90 
$ ./a.out 
 Greetings from i 42 of 43                                                      
 Greetings from i 42 of 43                                                      
$ export LD_LIBRARY_PATH=/home/jerry/dev/usr6/lib64/
$ ./a.out 
./a.out: /home/jerry/dev/usr6/lib64/libgfortran.so.3: version `GFORTRAN_1.8'
not found (required by ./a.out)
$ gfc6 pr77828.f90
$ ./a.out 
 Greetings from i 42 of 43                                                      
 Greetings from i 42 of 43                                                      
$ export LD_LIBRARY_PATH=/home/jerry/dev/usr/lib64/
$ ./a.out 
./a.out: relocation error: ./a.out: symbol _gfortran_st_write, version
GFORTRAN_1.0 not defined in file libgfortran.so.3 with link time reference

Is this acceptable?

Reply via email to