http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54370
Bug #: 54370 Summary: error: non-trivial conversion in unary operation Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: chiliki...@gmail.com The following: MODULE M CONTAINS LOGICAL(C_BOOL) FUNCTION L() BIND(C) USE, INTRINSIC :: ISO_C_BINDING L = .FALSE. END FUNCTION SUBROUTINE S() DO WHILE (L()) ENDDO END END (also in attached file) Results in: $ gfortran -c test.f08 test.f08: In function 's': test.f08:10:0: error: non-trivial conversion in unary operation logical(kind=4) logical(kind=1) D.1858 = ~D.1857; test.f08:10: confused by earlier errors, bailing out With compiler: $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/gcc-4.7.0/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ./configure --prefix=/opt/gcc-4.7.0/ Thread model: posix gcc version 4.7.0 (GCC) The same error appears in version 4.7.1. Compilation works in version 4.6.3 without any errors.