gfortran -static bug.f90 -lgomp -lpthread -lrt ./a.out << EOF -sta...@omp_get_max_threads EOF
#0 0x0000000000000000 in ?? () #1 0x000000000040e345 in get_external_unit (n=5, do_create=1) at /export/users/aagafono/gnu_4.5.0/gcc-4.5.0/libgfortran/../gcc/gthr-posix.h:767 #2 0x000000000040cecf in data_transfer_init (dtp=0x7fffdd077520, read_flag=1) at /export/users/aagafono/gnu_4.5.0/gcc-4.5.0/libgfortran/io/transfer.c:2133 #3 0x00000000004002e7 in MAIN__ () #4 0x000000000040047d in main () % cat bug.f90 program gompBUGonSTATIClinkagewithGNUfortran integer omp_get_max_threads integer n character*32 buf read *, buf n = omp_get_max_threads() print *, buf print *, n print *, 'TEST PASS' end -- Summary: static linkage with -lgomp fails on simple program Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: victor dot pasko at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44927