public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
@ 2013-07-30  8:38 ` janus at gcc dot gnu.org
  2013-07-30  9:17 ` janus at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2013-07-30  8:38 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-07-30
                 CC|                            |janus at gcc dot gnu.org
            Summary|ICE on invalid with missing |[F03] ICE on invalid with
                   |NOPASS                      |bad PPC declaration
     Ever confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org ---
Confirmed. The same ICE occurs on this variant:


  implicit none

  type :: sfd
    procedure(mr), pointer :: mr2
  end type

  type(sfd):: d
  print *, d%mr2()

end


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

* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
  2013-07-30  8:38 ` [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration janus at gcc dot gnu.org
@ 2013-07-30  9:17 ` janus at gcc dot gnu.org
  2013-07-30 13:08 ` janus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2013-07-30  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |janus at gcc dot gnu.org

--- Comment #2 from janus at gcc dot gnu.org ---
Draft patch:

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c    (revision 201283)
+++ gcc/fortran/resolve.c    (working copy)
@@ -12043,9 +12043,11 @@ resolve_fl_derived0 (gfc_symbol *sym)
     {
       gfc_symbol *ifc = c->ts.interface;

-      if (!sym->attr.vtype
-          && !check_proc_interface (ifc, &c->loc))
-        return false;
+      if (!sym->attr.vtype && !check_proc_interface (ifc, &c->loc))
+        {
+          c->tb->error = 1;
+          return false;
+        }

       if (ifc->attr.if_source || ifc->attr.intrinsic)
         {


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

* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
  2013-07-30  8:38 ` [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration janus at gcc dot gnu.org
  2013-07-30  9:17 ` janus at gcc dot gnu.org
@ 2013-07-30 13:08 ` janus at gcc dot gnu.org
  2013-07-30 17:33 ` janus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2013-07-30 13:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from janus at gcc dot gnu.org ---
(In reply to janus from comment #2)
> Draft patch:

Regtests cleanly. Will commit as obvious.


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

* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-07-30 13:08 ` janus at gcc dot gnu.org
@ 2013-07-30 17:33 ` janus at gcc dot gnu.org
  2013-07-30 17:49 ` janus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2013-07-30 17:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to janus from comment #2)
> Draft patch:

Unfortunately, this patch only fixes comment 1, but not comment 0!


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

* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2013-07-30 17:33 ` janus at gcc dot gnu.org
@ 2013-07-30 17:49 ` janus at gcc dot gnu.org
  2015-01-11 19:14 ` janus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2013-07-30 17:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from janus at gcc dot gnu.org ---
Comment 0 can be fixed by the following additional hunk in resolve.c:


@@ -12148,7 +12147,7 @@ resolve_fl_derived0 (gfc_symbol *sym)
                             "must have at least one argument",
                             c->name, &c->loc);
                  c->tb->error = 1;
-                 return false;
+                 continue;
                }
              me_arg = c->ts.interface->formal->sym;
            }


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

* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2013-07-30 17:49 ` janus at gcc dot gnu.org
@ 2015-01-11 19:14 ` janus at gcc dot gnu.org
  2015-01-11 19:32 ` janus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2015-01-11 19:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58023

--- Comment #6 from janus at gcc dot gnu.org ---
Author: janus
Date: Sun Jan 11 19:13:24 2015
New Revision: 219439

URL: https://gcc.gnu.org/viewcvs?rev=219439&root=gcc&view=rev
Log:
2015-01-11  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/58023
    * resolve.c (resolve_fl_derived0): Set error flag if problems with the
    interface of a procedure-pointer component were detected.

2015-01-11  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/58023
    * gfortran.dg/proc_ptr_comp_42.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_42.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2015-01-11 19:14 ` janus at gcc dot gnu.org
@ 2015-01-11 19:32 ` janus at gcc dot gnu.org
  2015-01-15 18:28 ` janus at gcc dot gnu.org
  2015-01-15 18:34 ` janus at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2015-01-11 19:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58023

--- Comment #7 from janus at gcc dot gnu.org ---
I have finally committed the patch in comment 2 (sorry that it took so long).

The ICE on comment 0 is still there, but for consistency one should do a bit
more than shown in comment 5. Will take care of that next.


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

* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2015-01-11 19:32 ` janus at gcc dot gnu.org
@ 2015-01-15 18:28 ` janus at gcc dot gnu.org
  2015-01-15 18:34 ` janus at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2015-01-15 18:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58023

--- Comment #8 from janus at gcc dot gnu.org ---
Author: janus
Date: Thu Jan 15 18:28:02 2015
New Revision: 219676

URL: https://gcc.gnu.org/viewcvs?rev=219676&root=gcc&view=rev
Log:
2015-01-15  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/58023
    * resolve.c (resolve_fl_derived0): Continue resolving next component
    after error.

2015-01-15  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/58023
    * gfortran.dg/proc_ptr_comp_43.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_43.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration
       [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2015-01-15 18:28 ` janus at gcc dot gnu.org
@ 2015-01-15 18:34 ` janus at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: janus at gcc dot gnu.org @ 2015-01-15 18:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58023

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from janus at gcc dot gnu.org ---
r219676 fixes the remaining problem with comment 0. Closing.


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

end of thread, other threads:[~2015-01-15 18:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-58023-4@http.gcc.gnu.org/bugzilla/>
2013-07-30  8:38 ` [Bug fortran/58023] [F03] ICE on invalid with bad PPC declaration janus at gcc dot gnu.org
2013-07-30  9:17 ` janus at gcc dot gnu.org
2013-07-30 13:08 ` janus at gcc dot gnu.org
2013-07-30 17:33 ` janus at gcc dot gnu.org
2013-07-30 17:49 ` janus at gcc dot gnu.org
2015-01-11 19:14 ` janus at gcc dot gnu.org
2015-01-11 19:32 ` janus at gcc dot gnu.org
2015-01-15 18:28 ` janus at gcc dot gnu.org
2015-01-15 18:34 ` janus at gcc dot gnu.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).