This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] Plug memory leaks; fix tree-check ICE for PR


Tobias Burnus wrote:

PS: I wonder why gfortran.dg/interface_3.f90 passed before, given that "proc_locus" wasn't set before. I also wonder why my patch causes the test case to segfault. Well, at least that bug is now also fixed.

Answer: Because I am too strupid to read the patch after spending way too much time on this patch. I had accidentally deleted a line:


@@ -2452,7 +2451,9 @@ loop:
    accept_statement (st);
    prog_unit = gfc_new_block;
    prog_unit->formal_ns = gfc_current_ns;
-  proc_locus = gfc_current_locus;
+  if (prog_unit == prog_unit->formal_ns->proc_name
+      && prog_unit->ns != prog_unit->formal_ns)
+    prog_unit->refs++;

On the other hand, I think the result of the current patch


subroutine thy_sub (a) ! { dg-error "enclosing procedure" }
1
Error: INTERFACE procedure 'thy_sub' at (1) has the same name as the enclosing procedure


is better than the previous result

subroutine thy_sub (a) ! { dg-error "enclosing procedure" }
1
Error: INTERFACE procedure 'thy_sub' at (1) has the same name as the enclosing procedure



Thus, puzzle solved and diagnostics improved.


Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]