This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34143] alloc_comp_constructor.f90 fails with -fdefault-integer-8
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Feb 2008 09:10:00 -0000
- Subject: [Bug fortran/34143] alloc_comp_constructor.f90 fails with -fdefault-integer-8
- References: <bug-34143-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from burnus at gcc dot gnu dot org 2008-02-06 09:09 -------
> Is the correct thing to throw an error or to quietly do the conversion?
I tried the example (with integer(4) and integer(8)) with several compilers and
none of them gave an error. (With -Wall g95 gives a conversion warning).
I thus think it is valid and one should do the conversion silently (except for
-Wconversion).
>From the Fortran 2003 standard:
"For a nonpointer component, the declared type and type parameters of the
component and expr shall conform in the same way as for a variable and expr in
an intrinsic assignment statement (7.4.1.2), as specified in Table 7.8."
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34143