PR Fortran/9263
* gcc/f/data.c (ffedata_advance_): Check initial, final and
increment values for INTEGER typeness.
PR Fortran/1832
* libf2c/libI77/iio.c (z_putc): Check for overflowing length
of output string.
* gcc/f/news.texi: Document these fixes.
PR Fortran/9263
* g77.f-torture/noncompile/9263.f: New test
PR Fortran/1832
* g77.f-torture/execute/1832.f: New test
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65481
138bc75d-0d04-0410-961f-
82ee72b054a4
+2003-04-11 Bud Davis <bdavis9659@comcast.net>
+
+ PR Fortran/9263
+ * gcc/f/data.c (ffedata_advance_): Check initial, final and
+ increment values for INTEGER typeness.
+ * gcc/f/news.texi: Document these fixes.
+
2003-03-27 Steven Bosscher <steven@gcc.gnu.org>
* ffe.texi: Don't mention dead file proj.c.
/* data.c -- Implementation File (module.c template V1.0)
- Copyright (C) 1995, 1996, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2002, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
assert (ffeinfo_kindtype (ffebld_info (itervar))
== FFEINFO_kindtypeINTEGERDEFAULT);
ffedata_stack_->itervar = ffebld_symter (itervar);
-
+ if (ffeinfo_basictype (ffebld_info (start)) != FFEINFO_basictypeINTEGER)
+ {
+ ffebad_start (FFEBAD_DATA_EVAL);
+ ffest_ffebad_here_current_stmt (0);
+ ffebad_finish ();
+ ffedata_pop_ ();
+ ffedata_reported_error_ = TRUE;
+ return FALSE;
+ }
assert (ffeinfo_basictype (ffebld_info (start))
== FFEINFO_basictypeINTEGER);
assert (ffeinfo_kindtype (ffebld_info (start))
== FFEINFO_kindtypeINTEGERDEFAULT);
ffesymbol_set_value (ffedata_stack_->itervar, ffedata_eval_integer1_ (start));
-
+ if (ffeinfo_basictype (ffebld_info (end)) != FFEINFO_basictypeINTEGER)
+ {
+ ffebad_start (FFEBAD_DATA_EVAL);
+ ffest_ffebad_here_current_stmt (0);
+ ffebad_finish ();
+ ffedata_pop_ ();
+ ffedata_reported_error_ = TRUE;
+ return FALSE;
+ }
assert (ffeinfo_basictype (ffebld_info (end))
== FFEINFO_basictypeINTEGER);
assert (ffeinfo_kindtype (ffebld_info (end))
ffedata_stack_->increment = 1;
else
{
+ if (ffeinfo_basictype (ffebld_info (incr)) != FFEINFO_basictypeINTEGER)
+ {
+ ffebad_start (FFEBAD_DATA_EVAL);
+ ffest_ffebad_here_current_stmt (0);
+ ffebad_finish ();
+ ffedata_pop_ ();
+ ffedata_reported_error_ = TRUE;
+ return FALSE;
+ }
assert (ffeinfo_basictype (ffebld_info (incr))
== FFEINFO_basictypeINTEGER);
assert (ffeinfo_kindtype (ffebld_info (incr))
@c in the standalone derivations of this file (e.g. NEWS).
@set copyrights-news 1995,1996,1997,1998,1999,2000,2001,2002,2003
-@set last-update-news 2003-03-24
+@set last-update-news 2003-04-11
@ifset DOC-NEWS
@include root.texi
@item
Problem Reports fixed (in chronological order of submission):
@table @code
+@item 1832
+-list directed i/o overflow hangs, -fbounds-check doesn't detect
@item 3924
g77 generates code which is rejected by GAS if COFF debugging info is
requested
Double complex zero ** double precision number -> NaN instead of zero
@item 9038
-ffixed-line-length-none -x f77-cpp-input gives: Warning: unknown register name line-length-none
+@item 9263
+ICE caused by invalid PARAMETER in implied DO loop
@item 10197
Direct access files not unformatted by default
@end table
+2003-04-11 Bud Davis <bdavis9659@comcast.net>
+
+ PR Fortran/9263
+ * g77.f-torture/noncompile/9263.f: New test
+ PR Fortran/1832
+ * g77.f-torture/execute/1832.f: New test
+
2003-04-11 David Chad <davidc@freebsd.org>
Loren J. Rittle <ljrittle@acm.org>
--- /dev/null
+ character*120 file
+ character*5 string
+ file = "c:/dos/adir/bdir/cdir/text.doc"
+ write(string, *) "a ", file
+ if (string .ne. ' a') call abort
+C-- The leading space is normal for list-directed output
+C-- "file" is not printed because it would overflow "string".
+ end
--- /dev/null
+ PARAMETER (Q=1)
+ PARAMETER (P=10)
+ INTEGER C(10),D(10),E(10),F(10)
+ DATA (C(I),I=1,P) /10*10/ ! TERMINAL NOT INTEGER
+ DATA (D(I),I=Q,10) /10*10/ ! START NOT INTEGER
+ DATA (E(I),I=1,10,Q) /10*10/ ! INCREMENT NOT INTEGER
+ END
+2003-04-11 Bud Davis <bdavis9659@comcast.net>
+
+ PR Fortran/1832
+ * libf2c/libI77/iio.c (z_putc): Check for overflowing length
+ of output string.
+
2003-03-24 Bud Davis <bdavis9659@comcast.net>
PR fortran/10197
void
z_putc (int c)
{
- if (f__icptr < f__icend && f__recpos++ < f__svic->icirlen)
+ if (f__recpos++ < f__svic->icirlen && f__icptr < f__icend)
*f__icptr++ = c;
}
int