public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikael at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56852] [4.6/4.7/4.8/4.9 Regression] ICE on invalid: "Bad array reference" for an undeclared loop variable
Date: Sun, 07 Apr 2013 11:48:00 -0000	[thread overview]
Message-ID: <bug-56852-4-n2drlMOeg8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56852-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56852

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-07 11:47:58 UTC ---
There is a simple fix, may be too big hammer:

diff --git a/resolve.c b/resolve.c
index 835b57f..0b44c98 100644
--- a/resolve.c
+++ b/resolve.c
@@ -14426,6 +14426,7 @@ gfc_resolve (gfc_namespace *ns)
 {
   gfc_namespace *old_ns;
   code_stack *old_cs_base;
+  int errors;

   if (ns->resolved)
     return;
@@ -14435,6 +14436,9 @@ gfc_resolve (gfc_namespace *ns)
   old_cs_base = cs_base;

   resolve_types (ns);
+  gfc_get_errors (NULL, &errors);
+  if (errors > 0)
+    return;
   component_assignment_level = 0;
   resolve_codes (ns);


  parent reply	other threads:[~2013-04-07 11:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 23:12 [Bug fortran/56852] New: " bugs at stellardeath dot org
2013-04-06  9:33 ` [Bug fortran/56852] [4.6/4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
2013-04-07 11:48 ` mikael at gcc dot gnu.org [this message]
2013-05-15 13:27 ` [Bug fortran/56852] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2014-06-12 13:41 ` [Bug fortran/56852] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:25 ` [Bug fortran/56852] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-02-18 13:29 ` dominiq at lps dot ens.fr
2015-04-09  7:41 ` pault at gcc dot gnu.org
2015-06-23  8:15 ` [Bug fortran/56852] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 19:52 ` [Bug fortran/56852] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:26 ` jakub at gcc dot gnu.org
2015-10-19  5:07 ` [Bug fortran/56852] [4.9 " pault at gcc dot gnu.org
2015-10-19 19:33 ` pault at gcc dot gnu.org
2015-10-19 19:36 ` pault at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56852-4-n2drlMOeg8@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).