This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54370] New: error: non-trivial conversion in unary operation
- From: "chilikin.k at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Aug 2012 21:48:51 +0000
- Subject: [Bug fortran/54370] New: error: non-trivial conversion in unary operation
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: chilikin.k@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.