public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libfortran/29784] New: Converting logical <-> integer in IO @ 2006-11-09 17:29 burnus at gcc dot gnu dot org 2007-03-18 17:53 ` [Bug libfortran/29784] " fxcoudert at gcc dot gnu dot org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: burnus at gcc dot gnu dot org @ 2006-11-09 17:29 UTC (permalink / raw) To: gcc-bugs Currently, gfortran supports integer = logical and logical = integer with a default warning "Extension: Conversion from INTEGER(4) to LOGICAL(4) at (1)" However, some compilers also support: print '(i0)', logical gfortran currently gives: "Fortran runtime error: Expected INTEGER for item 1 in formatted transfer, got LOGICAL" Other compilers: - g95 and NAG f95 give always a run-time error - Intel supports it (no warning; .true. is -1, .false.; int even = false, int odd = true); printing logical = 10, shows "10". - sunf95: Assignment not supported (compile-time error), but '(i0)' is supported ("1" and "0", 0 = .false., 0 /= .true.) - At least IO is also supported by g77, IBM xlf and HP/UX fort77 cf. http://gcc.gnu.org/ml/fortran/2006-11/msg00274.html Expected: (a) We explicitly state that this is not supported for IO. (b) We support '(i0)' for logical and document this also in "7.11 Implicitly interconvert LOGICAL and INTEGER" and continue to give for -std=f95/f2003 a run-time error, i.e. changing in io/transfer.c's formatted_transfer_scalar along these lines: case FMT_I: [...] if (require_type (dtp, BT_INTEGER, type, f)) - return; + { + if (compile_options.allow_std < GFC_STD_GNU + && require_type (dtp, BT_LOGICAL, type, f)) + return; + } Maybe one could also use GFC_STD_LEGACY instead of GFC_STD_GNU. I don't know whether one needs also to change something for READing or whether one wants to support reading. -- Summary: Converting logical <-> integer in IO Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29784 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libfortran/29784] Converting logical <-> integer in IO 2006-11-09 17:29 [Bug libfortran/29784] New: Converting logical <-> integer in IO burnus at gcc dot gnu dot org @ 2007-03-18 17:53 ` fxcoudert at gcc dot gnu dot org 2007-10-24 9:44 ` [Bug fortran/29784] [doc] No I/O conversion of logical/integer fxcoudert at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: fxcoudert at gcc dot gnu dot org @ 2007-03-18 17:53 UTC (permalink / raw) To: gcc-bugs -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-03-18 17:53:23 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29784 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/29784] [doc] No I/O conversion of logical/integer 2006-11-09 17:29 [Bug libfortran/29784] New: Converting logical <-> integer in IO burnus at gcc dot gnu dot org 2007-03-18 17:53 ` [Bug libfortran/29784] " fxcoudert at gcc dot gnu dot org @ 2007-10-24 9:44 ` fxcoudert at gcc dot gnu dot org 2007-10-25 23:27 ` fxcoudert at gcc dot gnu dot org 2007-10-25 23:28 ` fxcoudert at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: fxcoudert at gcc dot gnu dot org @ 2007-10-24 9:44 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-10-24 09:44 ------- We should document the current situation and close this (http://gcc.gnu.org/ml/fortran/2007-10/msg00263.html). -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial Component|libfortran |fortran Keywords| |documentation Last reconfirmed|2007-03-18 17:53:23 |2007-10-24 09:44:40 date| | Summary|Converting logical <-> |[doc] No I/O conversion of |integer in IO |logical/integer http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29784 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/29784] [doc] No I/O conversion of logical/integer 2006-11-09 17:29 [Bug libfortran/29784] New: Converting logical <-> integer in IO burnus at gcc dot gnu dot org 2007-03-18 17:53 ` [Bug libfortran/29784] " fxcoudert at gcc dot gnu dot org 2007-10-24 9:44 ` [Bug fortran/29784] [doc] No I/O conversion of logical/integer fxcoudert at gcc dot gnu dot org @ 2007-10-25 23:27 ` fxcoudert at gcc dot gnu dot org 2007-10-25 23:28 ` fxcoudert at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: fxcoudert at gcc dot gnu dot org @ 2007-10-25 23:27 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-10-25 23:27 ------- Subject: Bug 29784 Author: fxcoudert Date: Thu Oct 25 23:27:12 2007 New Revision: 129635 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129635 Log: PR fortran/29784 * gfortran.texi: Document that there is no logical/integer conversion performed during I/O operations. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/gfortran.texi -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29784 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/29784] [doc] No I/O conversion of logical/integer 2006-11-09 17:29 [Bug libfortran/29784] New: Converting logical <-> integer in IO burnus at gcc dot gnu dot org ` (2 preceding siblings ...) 2007-10-25 23:27 ` fxcoudert at gcc dot gnu dot org @ 2007-10-25 23:28 ` fxcoudert at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: fxcoudert at gcc dot gnu dot org @ 2007-10-25 23:28 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-10-25 23:27 ------- Fixed. -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29784 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-25 23:28 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-11-09 17:29 [Bug libfortran/29784] New: Converting logical <-> integer in IO burnus at gcc dot gnu dot org 2007-03-18 17:53 ` [Bug libfortran/29784] " fxcoudert at gcc dot gnu dot org 2007-10-24 9:44 ` [Bug fortran/29784] [doc] No I/O conversion of logical/integer fxcoudert at gcc dot gnu dot org 2007-10-25 23:27 ` fxcoudert at gcc dot gnu dot org 2007-10-25 23:28 ` fxcoudert at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).