public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF
@ 2010-06-09 8:13 burnus at gcc dot gnu dot org
2010-06-09 19:24 ` [Bug fortran/44477] " jvdelisle at gcc dot gnu dot org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-09 8:13 UTC (permalink / raw)
To: gcc-bugs
Based on
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/cfb5f9dca46d5114#
After ENDFILE for non-streams, the current file position should be at the
endfile record. Thus, running the program below with NAG gives:
READ/WRITE attempted after ENDFILE on unit 10
Program terminated by I/O error on unit 10 (File="XXX",Formatted,Sequential)
And with Pathf95:
A WRITE operation is invalid if the file is positioned after the end-of-file.
While with gfortran it simply runs. (Ditto for g95 and ifort.) [One could
continue to do so as extension, but one should do so knowingly.]
F2008: "9.8.3 ENDFILE statement"
"Execution of an ENDFILE statement for a file connected for sequential access
writes an endfile record as the next record of the file. The file is then
positioned after the end file record, which becomes the last record of the
file. If the file also may be connected for direct access, only those records
before the endfile record are considered to have been written. Thus, only those
records may be read during subsequent direct access connections to the \ffile.
After execution of an ENDFILE statement for a file connected for sequential
access, a BACKSPACE or REWIND statement shall be used to reposition the \ffile
prior to execution of any data transfer input/output statement or ENDFILE
statement.
Execution of an ENDFILE statement for a \ffile connected for stream access
causes the terminal point of the \ffile to become equal to the current file
position. Only file storage units before the current position are considered to
have been written; thus only those \ffile storage units may be subsequently
read. Subsequent stream output statements may be used to write further data to
the file.
Execution of an ENDFILE statement for a file that is connected but does not
exist creates the file; if the \ffile is connected for sequential access, it is
created prior to writing the endfile record."
!-------------------------------------------
OPEN(10, FILE='XXX', FORM='FORMATTED', &
ACTION='WRITE', POSITION='REWIND')
ENDFILE(10)
write(10,*) 'aa'
end
--
Summary: Sequential I/O with END FILE: File position should be at
EoF
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
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=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
@ 2010-06-09 19:24 ` jvdelisle at gcc dot gnu dot org
2010-06-09 19:41 ` burnus at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-06-09 19:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jvdelisle at gcc dot gnu dot org 2010-06-09 19:24 -------
As I read this, the test case is invalid since it does not have a rewind or
backspace before the write?
If we want to change this to be an intended extension, I suppose we should
issue a warning or error for -std= ?
I want to study this more before we do anything. Regression territory here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
2010-06-09 19:24 ` [Bug fortran/44477] " jvdelisle at gcc dot gnu dot org
@ 2010-06-09 19:41 ` burnus at gcc dot gnu dot org
2010-06-11 16:27 ` burnus at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-09 19:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2010-06-09 19:41 -------
(In reply to comment #1)
> As I read this, the test case is invalid since it does not have a rewind or
> backspace before the write?
Yes - I expect that gfortran should issue an EOR error instead of happily
accepting an I/O transfer.
> If we want to change this to be an intended extension, I suppose we should
> issue a warning or error for -std= ?
Well, I think we can do two things:
a) Keep the current status and claim it is an extension
b) Change it to match NAG f95 and Pathscale and print a run-time EoF error. (Or
the equivalent for ERR=/IOSTAT=/IOMSG=.)
I do not think that it makes sense to allow it for -std=(gnu/legacy) and not
for -std=f(95/2003/2008).
As Pathscale prints an error, there is hope that not too many programs rely on
having no BACKSPACE/REWIND.
Error: Pathscale 3.2.99, NAG f95 v5.1, Open64 4.2
No error: ifort 11.1, gfortran, g95, sunf95 8.3 (sunstudio12), Portland's pgf90
v6.2 and v10.3.
(No idea what g77 did.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
2010-06-09 19:24 ` [Bug fortran/44477] " jvdelisle at gcc dot gnu dot org
2010-06-09 19:41 ` burnus at gcc dot gnu dot org
@ 2010-06-11 16:27 ` burnus at gcc dot gnu dot org
2010-06-12 22:33 ` jvdelisle at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-11 16:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2010-06-11 16:27 -------
For completeness, also Cray Fortran 7.2.3 prints:
A WRITE operation is invalid if the file is positioned after the end-of-file.
Updated summary:
- Error with: NAG f95 v5.1, Pathscale pathf95 3.2.99, Cray ftn 8.2.3, Open64
4.2
- No error with: ifort 11.1, gfortran, g95, sunf95 8.3 (sunstudio12),
Portland's pgf90
v6.2 and v10.3.
- Unknown: g77, ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-06-11 16:27 ` burnus at gcc dot gnu dot org
@ 2010-06-12 22:33 ` jvdelisle at gcc dot gnu dot org
2010-06-19 0:58 ` jvdelisle at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-06-12 22:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2010-06-12 22:33 -------
How about this when attempting a READ or WRITE after an ENDFILE. (original
testcase)
$ gfc pr44477.f90
$ ./a.out
At line 5 of file pr44477.f90 (unit = 10, file = 'XXX')
Fortran runtime error: Sequential READ or WRITE not allowed after EOF marker,
possibly use REWIND or BACKSPACE
and then this for an ENDFILE after an ENDFILE.
$ ./a.out
At line 5 of file pr44477.f90 (unit = 10, file = 'XXX')
Fortran runtime error: Cannot perform ENDFILE on a file already positiond after
the EOF marker
Patch testing.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-06-12 22:33:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-06-12 22:33 ` jvdelisle at gcc dot gnu dot org
@ 2010-06-19 0:58 ` jvdelisle at gcc dot gnu dot org
2010-06-19 1:05 ` jvdelisle at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-06-19 0:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2010-06-19 00:58 -------
Subject: Bug 44477
Author: jvdelisle
Date: Sat Jun 19 00:58:28 2010
New Revision: 161020
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161020
Log:
2010-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/44477
* io/file_pos.c (st_endfile): Add check for ENDFILE when file is
already positioned after the EOF marker. Use find_or_create_unit
instead of find_unit. If unit is not connected, connect it and create
the file with default settings.
* io/transfer.c (data_transfer_init): Add check for attempted READ or
WRITE when file is already positioned after the EOF marker.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/file_pos.c
trunk/libgfortran/io/transfer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-06-19 0:58 ` jvdelisle at gcc dot gnu dot org
@ 2010-06-19 1:05 ` jvdelisle at gcc dot gnu dot org
2010-06-20 16:15 ` michael dot a dot richmond at nasa dot gov
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-06-19 1:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2010-06-19 01:05 -------
Subject: Bug 44477
Author: jvdelisle
Date: Sat Jun 19 01:05:05 2010
New Revision: 161021
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161021
Log:
2010-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/44477
* gfortran.dg/eof_3.f90
* gfortran.dg/endfile_2.f90
* gfortran.dg/endfile_4.f90
* gfortran.dg/endfile_3.f90
Added:
trunk/gcc/testsuite/gfortran.dg/endfile_3.f90
trunk/gcc/testsuite/gfortran.dg/endfile_4.f90
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/endfile_2.f90
trunk/gcc/testsuite/gfortran.dg/eof_3.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-06-19 1:05 ` jvdelisle at gcc dot gnu dot org
@ 2010-06-20 16:15 ` michael dot a dot richmond at nasa dot gov
2010-06-20 16:41 ` kargl at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2010-06-20 16:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from michael dot a dot richmond at nasa dot gov 2010-06-20 16:14 -------
The following occurs in the snapshot of June 19, but not in earlier snapshots:
mrichmon@msc545ux:~$ cat test.f90
PROGRAM test
END FILE 10
END FILE 10
END PROGRAM test
mrichmon@msc545ux:~$ gfortran test.f90
mrichmon@msc545ux:~$ ./a.out
At line 3 of file test.f90 (unit = 10, file = 'fort.10')
Fortran runtime error: Cannot perform ENDFILE on a file already positioned
after the EOF marker
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (6 preceding siblings ...)
2010-06-20 16:15 ` michael dot a dot richmond at nasa dot gov
@ 2010-06-20 16:41 ` kargl at gcc dot gnu dot org
2010-06-20 19:58 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-06-20 16:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from kargl at gcc dot gnu dot org 2010-06-20 16:41 -------
(In reply to comment #7)
> The following occurs in the snapshot of June 19, but not in earlier snapshots:
>
> mrichmon@msc545ux:~$ cat test.f90
> PROGRAM test
> END FILE 10
> END FILE 10
> END PROGRAM test
> mrichmon@msc545ux:~$ gfortran test.f90
> mrichmon@msc545ux:~$ ./a.out
> At line 3 of file test.f90 (unit = 10, file = 'fort.10')
> Fortran runtime error: Cannot perform ENDFILE on a file already positioned
> after the EOF marker
>
Did you read the error message? The code is invalid. For the Fortran 95
standard:
After execution of an ENDFILE statement, a BACKSPACE or REWIND
statement shall be used to reposition the file prior to execution
of any data transfer input/output statement or ENDFILE statement.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (7 preceding siblings ...)
2010-06-20 16:41 ` kargl at gcc dot gnu dot org
@ 2010-06-20 19:58 ` jvdelisle at gcc dot gnu dot org
2010-06-22 11:56 ` michael dot a dot richmond at nasa dot gov
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-06-20 19:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2010-06-20 19:57 -------
Michael, is this a legacy code issue? two ENDFILE in a row?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (8 preceding siblings ...)
2010-06-20 19:58 ` jvdelisle at gcc dot gnu dot org
@ 2010-06-22 11:56 ` michael dot a dot richmond at nasa dot gov
2010-06-22 13:01 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2010-06-22 11:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from michael dot a dot richmond at nasa dot gov 2010-06-22 11:55 -------
(In reply to comment #9)
> Michael, is this a legacy code issue? two ENDFILE in a row?
>
It is legacy code
--
michael dot a dot richmond at nasa dot gov changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |michael dot a dot richmond
| |at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (9 preceding siblings ...)
2010-06-22 11:56 ` michael dot a dot richmond at nasa dot gov
@ 2010-06-22 13:01 ` burnus at gcc dot gnu dot org
2010-06-22 13:02 ` michael dot a dot richmond at nasa dot gov
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-06-22 13:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from burnus at gcc dot gnu dot org 2010-06-22 13:01 -------
(In reply to comment #10)
> (In reply to comment #9)
> > Michael, is this a legacy code issue? two ENDFILE in a row?
> It is legacy code
Any idea how to best deal with this?
The standard is pretty clear that it is invalid (cf. comment 0 and comment 8) -
though the standard is pretty weak about what a conforming "processor" (i.e.
compiler + run-time library) shall do for I/O, thus, there is some freedom.
For the example in comment 0, several compilers print a run-time error:
NAG f95 v5.1, Pathscale pathf95 3.2.99, Cray ftn 8.2.3, Open64 4.2, gfortran
4.6
If there has been no file access (write/read/open/rewind) before the first,
ENDFILE, the second ENDFILE succeeds with crayftn, openf95, and pathf95. (NAG
has the bogus error that the file is not open.) While (cf. comment 6) with
gfortran there is an error for the second endfile.
For the legacy program, would it be enough to allow - similarly to
Cray/Open64/Pathscale - two ENDFILEs on unopened files? Or do you also use
other endfile/endfile combinations? (If so, the program should also fail
Cray/Open64/Pathscale/NAG.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (10 preceding siblings ...)
2010-06-22 13:01 ` burnus at gcc dot gnu dot org
@ 2010-06-22 13:02 ` michael dot a dot richmond at nasa dot gov
2010-06-23 2:37 ` jvdelisle at gcc dot gnu dot org
2010-06-23 2:38 ` jvdelisle at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2010-06-22 13:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from michael dot a dot richmond at nasa dot gov 2010-06-22 13:02 -------
I will modify my code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (11 preceding siblings ...)
2010-06-22 13:02 ` michael dot a dot richmond at nasa dot gov
@ 2010-06-23 2:37 ` jvdelisle at gcc dot gnu dot org
2010-06-23 2:38 ` jvdelisle at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-06-23 2:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jvdelisle at gcc dot gnu dot org 2010-06-23 02:37 -------
Closing as fixed. If the issue of double endfile sequences pops up again we
can consider putting th errors behind -std=legacy.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/44477] Sequential I/O with END FILE: File position should be at EoF
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
` (12 preceding siblings ...)
2010-06-23 2:37 ` jvdelisle at gcc dot gnu dot org
@ 2010-06-23 2:38 ` jvdelisle at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-06-23 2:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jvdelisle at gcc dot gnu dot org 2010-06-23 02:37 -------
Closed
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44477
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-06-23 2:38 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09 8:13 [Bug fortran/44477] New: Sequential I/O with END FILE: File position should be at EoF burnus at gcc dot gnu dot org
2010-06-09 19:24 ` [Bug fortran/44477] " jvdelisle at gcc dot gnu dot org
2010-06-09 19:41 ` burnus at gcc dot gnu dot org
2010-06-11 16:27 ` burnus at gcc dot gnu dot org
2010-06-12 22:33 ` jvdelisle at gcc dot gnu dot org
2010-06-19 0:58 ` jvdelisle at gcc dot gnu dot org
2010-06-19 1:05 ` jvdelisle at gcc dot gnu dot org
2010-06-20 16:15 ` michael dot a dot richmond at nasa dot gov
2010-06-20 16:41 ` kargl at gcc dot gnu dot org
2010-06-20 19:58 ` jvdelisle at gcc dot gnu dot org
2010-06-22 11:56 ` michael dot a dot richmond at nasa dot gov
2010-06-22 13:01 ` burnus at gcc dot gnu dot org
2010-06-22 13:02 ` michael dot a dot richmond at nasa dot gov
2010-06-23 2:37 ` jvdelisle at gcc dot gnu dot org
2010-06-23 2:38 ` jvdelisle 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).