At least on MinGW64 (as reported by nightstrike), the following warning is printed when compiling libgfortran: libgfortran/io/list_read.c:1872:10: warning: variable 'elem' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered] If one looks at the source, one sees: 1869 list_formatted_read (st_parameter_dt *dtp, bt type, void *p, int kind, 1870 size_t size, size_t nelems) 1871 { 1872 size_t elem; [...] 1880 for (elem = 0; elem < nelems; elem++) 1881 { 1882 dtp->u.p.item_count++; 1883 list_formatted_read_scalar (dtp, type, tmp + stride*elem, kind, size); with 1704 list_formatted_read_scalar (st_parameter_dt *dtp, volatile bt type, void *p, 1710 jmp_buf eof_jump; However, I do not see how "elem" itself gets clobbered - thus the warning looks bogus to me, but I have only glanced at the code.
Created attachment 22068 [details] Preliminary patch Preliminary patch for getting rid of setjmp/longjmp, instead using an errno-style flag variable.
(In reply to comment #1) > Created attachment 22068 [details] > Preliminary patch > > Preliminary patch for getting rid of setjmp/longjmp, instead using an > errno-style flag variable. ... preliminary, as in fails a few testcases. Anyways, I'm not sure when I'll have time to finish it, but if anyone wants to lend a hand. Not that it's any particularly high priority either.
I will look it over when I have a few other bugs out of the way.
Scratch that previous patch. It turned out to not be such a good idea after all, I'm working on a better approach.
Patch here: http://gcc.gnu.org/ml/gcc-patches/2010-11/msg00096.html
Author: jb Date: Tue Nov 2 12:56:38 2010 New Revision: 166180 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166180 Log: PR 45629 Remove usage of setjmp/longjmp Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/io.h trunk/libgfortran/io/list_read.c trunk/libgfortran/io/transfer.c
Closing as fixed.