public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
       [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
@ 2006-01-22 19:18 ` kargl at gcc dot gnu dot org
  2006-05-10 12:59 ` paul dot richard dot thomas at cea dot fr
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-01-22 19:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2006-01-22 19:18 -------
Here's the back trace.

#0  gfc_free_namespace (ns=0x861d800) at ../../gcc4x/gcc/fortran/symbol.c:2361
#1  0x0808a292 in free_sym_tree (sym_tree=0x8616560)
    at ../../gcc4x/gcc/fortran/symbol.c:2328
#2  0x0808a2e3 in gfc_free_namespace (ns=0x861d800)
    at ../../gcc4x/gcc/fortran/symbol.c:2376
#3  0x0808a3ea in gfc_symbol_done_2 () at ../../gcc4x/gcc/fortran/symbol.c:2423
#4  0x08073318 in gfc_done_2 () at ../../gcc4x/gcc/fortran/misc.c:293
#5  0x080786e6 in unexpected_eof () at ../../gcc4x/gcc/fortran/parse.c:1242
#6  0x08079439 in parse_spec (st=ST_NONE)
    at ../../gcc4x/gcc/fortran/parse.c:1395
#7  0x08079791 in parse_spec (st=ST_INTERFACE)
    at ../../gcc4x/gcc/fortran/parse.c:1526
#8  0x08079a55 in parse_progunit (st=ST_ALLOCATE)
    at ../../gcc4x/gcc/fortran/parse.c:2328
#9  0x0807a0e0 in gfc_parse_file () at ../../gcc4x/gcc/fortran/parse.c:2631

The 2nd Error is trying to clean up a name space where the reference count
has not been increment from 0.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
       [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
  2006-01-22 19:18 ` [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208 kargl at gcc dot gnu dot org
@ 2006-05-10 12:59 ` paul dot richard dot thomas at cea dot fr
  2006-05-12  4:35 ` pault at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-05-10 12:59 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]



------- Comment #3 from paul dot richard dot thomas at cea dot fr  2006-05-10 12:59 -------
I think that it is not correct to emit an ICE on this one.  The patch below
emits an error and bails out.

I will submit in the next 24hours.

Paul

Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c        (r&#9500;®vision 113111)
+++ gcc/fortran/symbol.c        (copie de travail)
@@ -2490,8 +2490,15 @@
   ns->refs--;
   if (ns->refs > 0)
     return;
-  gcc_assert (ns->refs == 0);

+  if (ns->refs != 0)
+    {
+      gfc_error_now ("namespace %s has %d references on being freed",
+                    ns->proc_name->name ? ns->proc_name->name : "MAIN",
+                    ns->refs + 1);
+      return;
+    }
+
   gfc_free_statements (ns->code);

   free_sym_tree (ns->sym_root);


-- 

paul dot richard dot thomas at cea dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paul dot richard dot thomas
                   |                            |at cea dot fr


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
       [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
  2006-01-22 19:18 ` [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208 kargl at gcc dot gnu dot org
  2006-05-10 12:59 ` paul dot richard dot thomas at cea dot fr
@ 2006-05-12  4:35 ` pault at gcc dot gnu dot org
  2006-05-15 19:42 ` patchapp at dberlin dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-05-12  4:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2006-05-12 04:34 -------
Apparently ignoring the ICE is given the thumbs down.  See today's list.

Paul


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
       [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-05-12  4:35 ` pault at gcc dot gnu dot org
@ 2006-05-15 19:42 ` patchapp at dberlin dot org
  2006-10-21  0:16 ` jvdelisle at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: patchapp at dberlin dot org @ 2006-05-15 19:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from patchapp at dberlin dot org  2006-05-15 19:41 -------
Subject: Bug number PR17741

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00483.html


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
       [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-05-15 19:42 ` patchapp at dberlin dot org
@ 2006-10-21  0:16 ` jvdelisle at gcc dot gnu dot org
  2006-10-22  0:09 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-10-21  0:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jvdelisle at gcc dot gnu dot org  2006-10-21 00:16 -------
I will see what I can figure out here now.


-- 

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|NEW                         |ASSIGNED
   Last reconfirmed|2006-09-03 21:39:48         |2006-10-21 00:16:04
               date|                            |


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
       [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-10-21  0:16 ` jvdelisle at gcc dot gnu dot org
@ 2006-10-22  0:09 ` jvdelisle at gcc dot gnu dot org
  2006-10-29 16:44 ` jvdelisle at gcc dot gnu dot org
  2006-10-29 16:45 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-10-22  0:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jvdelisle at gcc dot gnu dot org  2006-10-22 00:09 -------
Created an attachment (id=12472)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12472&action=view)
A prelimary patch as one concept for handling this

This patch gives a good result for error messages.  However we are still left
with some memory leak.  I will have to explore this some more.  The concept is
to reset the locus and then return the correct end statement after emitting the
error message.  Whats nice about this is it gives errors for all the nested
statements missing the correct "END"

Comments anyone?


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
       [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2006-10-22  0:09 ` jvdelisle at gcc dot gnu dot org
@ 2006-10-29 16:44 ` jvdelisle at gcc dot gnu dot org
  2006-10-29 16:45 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-10-29 16:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jvdelisle at gcc dot gnu dot org  2006-10-29 16:43 -------
Subject: Bug 17741

Author: jvdelisle
Date: Sun Oct 29 16:43:48 2006
New Revision: 118149

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118149
Log:
2006-10-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/17741
        * decl.c (get_proc_name): Bump current namespace refs count.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
       [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2006-10-29 16:44 ` jvdelisle at gcc dot gnu dot org
@ 2006-10-29 16:45 ` jvdelisle at gcc dot gnu dot org
  7 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-10-29 16:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jvdelisle at gcc dot gnu dot org  2006-10-29 16:45 -------
Fixed on 4.3, no need to backport


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
  2004-09-29 21:51 [Bug fortran/17741] New: " schnetter at aei dot mpg dot de
  2004-09-30 14:20 ` [Bug fortran/17741] " reichelt at gcc dot gnu dot org
@ 2005-07-23  5:05 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23  5:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208
  2004-09-29 21:51 [Bug fortran/17741] New: " schnetter at aei dot mpg dot de
@ 2004-09-30 14:20 ` reichelt at gcc dot gnu dot org
  2005-07-23  5:05 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-09-30 14:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-09-30 14:20 -------
Confirmed. Here's an even shorter testcase:

============================
subroutine FOO
  interface
    integer function BAR()
end subroutine
============================


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-30 14:20:39
               date|                            |


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-10-29 16:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-17741-7427@http.gcc.gnu.org/bugzilla/>
2006-01-22 19:18 ` [Bug fortran/17741] ICE in gfc_free_namespace, at fortran/symbol.c:2208 kargl at gcc dot gnu dot org
2006-05-10 12:59 ` paul dot richard dot thomas at cea dot fr
2006-05-12  4:35 ` pault at gcc dot gnu dot org
2006-05-15 19:42 ` patchapp at dberlin dot org
2006-10-21  0:16 ` jvdelisle at gcc dot gnu dot org
2006-10-22  0:09 ` jvdelisle at gcc dot gnu dot org
2006-10-29 16:44 ` jvdelisle at gcc dot gnu dot org
2006-10-29 16:45 ` jvdelisle at gcc dot gnu dot org
2004-09-29 21:51 [Bug fortran/17741] New: " schnetter at aei dot mpg dot de
2004-09-30 14:20 ` [Bug fortran/17741] " reichelt at gcc dot gnu dot org
2005-07-23  5:05 ` pinskia 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).