public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/44978] derived types are resolved more than once
Date: Tue, 13 Aug 2013 09:38:00 -0000	[thread overview]
Message-ID: <bug-44978-4-VeBRfwuq0H@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-44978-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #17 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
In what follows "Janus' patch" will refer to
http://gcc.gnu.org/bugzilla/attachment.cgi?id=30629
and "Mikael's patch" to
http://gcc.gnu.org/bugzilla/attachment.cgi?id=30633

Although there are still duplicate errors, both patches regtest cleanly and are
a significant improvement. I have seen the following differences between the
two patches (I'll attach the full differences):

(1) pr43591, Mikael's patch output the additional error

pr43591.f90:8.77:

     procedure(number_flavor_states), nopass, pointer :: number_flavor_states
=> NULL()
                                         1
Error: Interface 'number_flavor_states' at (1) must be explicit

For both patches the error

pr43591.f90:15.23:

    integer, dimension(physical%number_particles_out(), &
               1
Error: Expression at (1) must be of INTEGER type, found UNKNOWN

is printed twice.

(2) pr48095, the error

pr48095.f90:7.79:

    procedure(get_area), pointer, pass(this) :: get_special_area => get_my_area
                                           1
Error: Interface mismatch in procedure pointer assignment at (1): Type mismatch
in argument 'this' (CLASS(rectangle)/TYPE(rectangle))

is printed three times with Janus' patch and only twice with Mikael's one.

(3) pr55983, with Janus' patch, the last error is

pr55983.f90:16.32:

    class(bcd_t), pointer :: bcx, bcy
                1
Error: The pointer component 'bcx' of '__class_solver_mpdata_m_Mpdata_t' at (1)
is a type that has not been declared

while with Mikael's patch it is

pr55983.f90:16.37:

    class(bcd_t), pointer :: bcx, bcy
                     1
Error: The pointer component 'bcy' of 'mpdata_t' at (1) is a type that has not
been declared

For a clean tree it is

    class(bcd_t), pointer :: bcx, bcy
                                1
Error: The pointer component 'bcx' of 'mpdata_t' at (1) is a type that has not
been declared

(4) pr58023, compiling both tests with Janus' patch gives an ICE, while with
Mikale's patch the first test gives a second error

pr58023.f90:11.34:

     procedure(mr), pointer :: mr2
                  1
Error: Procedure pointer component 'mr2' with PASS at (1) must have at least
one argument

> I also took the opportunity to extend your pr51945 change (hunk below) 
> to the whole loop.

This also fixes pr58023#c0. pr58023#c1 is fixed if I replace the following
hunks

@@ -12024,7 +12036,8 @@ resolve_fl_derived0 (gfc_symbol *sym)
       gfc_error ("Component '%s' at %L with coarray component "
              "shall be a nonpointer, nonallocatable scalar",
              c->name, &c->loc);
-      return false;
+      retval = false;
+      continue;
     }

       /* F2008, C448.  */
@@ -12032,7 +12045,8 @@ resolve_fl_derived0 (gfc_symbol *sym)
     {
       gfc_error ("Component '%s' at %L has the CONTIGUOUS attribute but "
              "is not an array pointer", c->name, &c->loc);
-      return false;
+      retval = false;
+      continue;
     }

       if (c->attr.proc_pointer && c->ts.interface)

with


@@ -12031,16 +12035,20 @@ resolve_fl_derived0 (gfc_symbol *sym)
     {
       gfc_error ("Component '%s' at %L has the CONTIGUOUS attribute but "
              "is not an array pointer", c->name, &c->loc);
-      return false;
+      retval = false;
+      continue;
     }

       if (c->attr.proc_pointer && c->ts.interface)
     {
       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;
+          retval = false;
+          continue;
+        }

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


  parent reply	other threads:[~2013-08-13  9:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-44978-4@http.gcc.gnu.org/bugzilla/>
2013-04-13 11:15 ` [Bug fortran/44978] extended " janus at gcc dot gnu.org
2013-06-15 11:12 ` dominiq at lps dot ens.fr
2013-08-08 20:00 ` [Bug fortran/44978] " janus at gcc dot gnu.org
2013-08-08 21:24 ` janus at gcc dot gnu.org
2013-08-09  6:00 ` janus at gcc dot gnu.org
2013-08-09 13:37 ` janus at gcc dot gnu.org
2013-08-09 13:59 ` janus at gcc dot gnu.org
2013-08-09 15:03 ` mikael at gcc dot gnu.org
2013-08-09 19:23 ` janus at gcc dot gnu.org
2013-08-09 19:55 ` mikael at gcc dot gnu.org
2013-08-10  7:55 ` janus at gcc dot gnu.org
2013-08-11  8:54 ` janus at gcc dot gnu.org
2013-08-11 11:34 ` mikael at gcc dot gnu.org
2013-08-11 17:22 ` janus at gcc dot gnu.org
2013-08-11 19:12 ` mikael at gcc dot gnu.org
2013-08-13  9:38 ` dominiq at lps dot ens.fr [this message]
2013-08-13  9:40 ` dominiq at lps dot ens.fr
2013-08-13  9:54 ` dominiq at lps dot ens.fr
2013-08-13 14:14 ` dominiq at lps dot ens.fr
2015-01-15 18:44 ` janus 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-44978-4-VeBRfwuq0H@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).