aboutsummaryrefslogtreecommitdiff
path: root/gcc/f
diff options
context:
space:
mode:
authorBud Davis <bdavis9659@comcast.net>2003-04-11 21:33:48 +0000
committerToon Moene <toon@gcc.gnu.org>2003-04-11 21:33:48 +0000
commit62520b200418a0fe365740c18da27f1b0c852315 (patch)
tree9447e72ba92ded418534b60dfb93b17733812cfc /gcc/f
parent2ae5ae57ba6177af4fe8ba2951e8864c6bdb7c87 (diff)
downloadgcc-62520b200418a0fe365740c18da27f1b0c852315.zip
gcc-62520b200418a0fe365740c18da27f1b0c852315.tar.gz
gcc-62520b200418a0fe365740c18da27f1b0c852315.tar.bz2
re PR fortran/9263 (ICE caused by invalid PARAMETER in implied DO loop)
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. 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 From-SVN: r65481
Diffstat (limited to 'gcc/f')
-rw-r--r--gcc/f/ChangeLog7
-rw-r--r--gcc/f/data.c31
-rw-r--r--gcc/f/news.texi6
3 files changed, 40 insertions, 4 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 14f1b84..d6ff719 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,10 @@
+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.
diff --git a/gcc/f/data.c b/gcc/f/data.c
index 3e1ae62..91b835d 100644
--- a/gcc/f/data.c
+++ b/gcc/f/data.c
@@ -1,5 +1,5 @@
/* 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.
@@ -591,13 +591,29 @@ tail_recurse: /* :::::::::::::::::::: */
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))
@@ -608,6 +624,15 @@ tail_recurse: /* :::::::::::::::::::: */
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))
diff --git a/gcc/f/news.texi b/gcc/f/news.texi
index 0d07df4..27edb02 100644
--- a/gcc/f/news.texi
+++ b/gcc/f/news.texi
@@ -11,7 +11,7 @@
@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
@@ -164,6 +164,8 @@ Nothing yet.
@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
@@ -191,6 +193,8 @@ Incorrect output with 0-based array of characters
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