strange gfortran problem

Victor Eijkhout eijkhout at tacc.utexas.edu
Thu Apr 26 18:02:39 PDT 2012


this may be more suited for the dev list….

I have a  small fortran program that gives different (read: wrong) output on macports from on linux.

[albook:~/Current/petsc-course/course20120514/fsolutions] %% gfortran --version
GNU Fortran (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

[albook:~/Current/petsc-course/course20120514/fsolutions] %% gfortran sizeof.f 
[albook:~/Current/petsc-course/course20120514/fsolutions] %% a.out
 int4:                    8
 int8:                   16
### that should be 4 & 8
[albook:~/Current/petsc-course/course20120514/fsolutions] %% cat sizeof.f 
       program main
       integer(kind=selected_int_kind(5)) a
       integer(kind=selected_int_kind(10)) b
       write(*,*) 'int4:',sizeof(a)
       write(*,*) 'int8:',sizeof(b)
       end
[albook:~/Current/petsc-course/course20120514/fsolutions] %% which gfortran 
/opt/local/bin/gfortran
[albook:~/Current/petsc-course/course20120514/fsolutions] %% ls -l `!!`
ls -l `which gfortran `
lrwxr-xr-x  1 root  admin  30 Apr 26 19:44 /opt/local/bin/gfortran@ -> /opt/local/bin/gfortran-mp-4.6



More information about the macports-users mailing list