I'm attaching a very simple reproducer which, if compiled like following way: ifort -c lsame.f gfortran repr.f lsame.o
produces a wrong negation of a logical value returned by function LSAME(a simpified analogue for LAPACK one available in attach). The value for .NOT.LSAME('D','D') and LSAME('D','D') are both true. So it looks like something wrong on GFORTRAN side. If I use gfortran 4.2.0 or compile lsame with any gfortran, the logical results are correct. Change of Intel compiler version ( 9.1, 10.1 were tested ) doesn't affect result. This reproducable for ia32 and Intel64 architectures. -- Summary: Inversion of logical function compiled with ifort not correct. Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: alexander dot v dot kobotov at intel dot com GCC host triplet: Linux 2.6.16.46-0.12-smp http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40539