public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41656]  New: [OOP] Unresolved GENERIC
@ 2009-10-10 12:52 sfilippone at uniroma2 dot it
  2009-10-10 12:53 ` [Bug fortran/41656] " sfilippone at uniroma2 dot it
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sfilippone at uniroma2 dot it @ 2009-10-10 12:52 UTC (permalink / raw)
  To: gcc-bugs

The attached code produces the following error message. 
---------------------------------------------------------
[sfilippo@localhost bug5]$ gfortran -v 
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/local/gnu45/bin/../libexec/gcc/i686-pc-linux-gnu/4.5.0
/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gnu45
--enable-languages=c
,c++,fortran : (reconfigured) ../gcc/configure --prefix=/usr/local/gnu45
--enabl
e-languages=c,c++,fortran
Thread model: posix
gcc version 4.5.0 20091010 (experimental) (GCC) 
[sfilippo@localhost bug5]$ gfortran -c test-der5.f03
test-der5.f03:223.10:

    call a%a%scal(d,info)
          1
Error: Found no matching specific binding for the call to the GENERIC 'scal' at 
(1)
test-der5.f03:206.10:

    call a%a%scal(d,info)
          1
Error: Found no matching specific binding for the call to the GENERIC 'scal' at 
(1)
-------------------------------------------------------------------------------

The code is cut from a larger application library in which the same symptoms
show up multiple times. 
The library compiles and executes fine with NAG 5.2


-- 
           Summary: [OOP] Unresolved GENERIC
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sfilippone at uniroma2 dot it
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/41656] [OOP] Unresolved GENERIC
  2009-10-10 12:52 [Bug fortran/41656] New: [OOP] Unresolved GENERIC sfilippone at uniroma2 dot it
@ 2009-10-10 12:53 ` sfilippone at uniroma2 dot it
  2009-10-11 16:06 ` pault at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sfilippone at uniroma2 dot it @ 2009-10-10 12:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sfilippone at uniroma2 dot it  2009-10-10 12:53 -------
Created an attachment (id=18772)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18772&action=view)
test case


-- 


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


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

* [Bug fortran/41656] [OOP] Unresolved GENERIC
  2009-10-10 12:52 [Bug fortran/41656] New: [OOP] Unresolved GENERIC sfilippone at uniroma2 dot it
  2009-10-10 12:53 ` [Bug fortran/41656] " sfilippone at uniroma2 dot it
@ 2009-10-11 16:06 ` pault at gcc dot gnu dot org
  2009-10-11 18:19 ` sfilippone at uniroma2 dot it
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-10-11 16:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2009-10-11 16:05 -------
Created an attachment (id=18783)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18783&action=view)
Provisional fix for this PR

Hi Salvatore,

You might like to exercise this patch.  It seems to work correctly but I would
be interested to know how it works when used in anger.

I am unable to commit anything for the next few days and I wish to fix PR41648
at the same time, since it suffers the same problem.  Therefore, posting the
patch, testcases and so on is a few days away.

ciao

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


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


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

* [Bug fortran/41656] [OOP] Unresolved GENERIC
  2009-10-10 12:52 [Bug fortran/41656] New: [OOP] Unresolved GENERIC sfilippone at uniroma2 dot it
  2009-10-10 12:53 ` [Bug fortran/41656] " sfilippone at uniroma2 dot it
  2009-10-11 16:06 ` pault at gcc dot gnu dot org
@ 2009-10-11 18:19 ` sfilippone at uniroma2 dot it
  2009-10-12 13:44 ` sfilippone at uniroma2 dot it
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sfilippone at uniroma2 dot it @ 2009-10-11 18:19 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #3 from sfilippone at uniroma2 dot it  2009-10-11 18:19 -------
(In reply to comment #2)
Hi Paul,
Seems to work as advertised, in that it takes out the errors it's supposed to
cure. 
On  my  full application I now get this:
psb_s_mat_mod.f03:1345.45:

      allocate(altmp, source=mold,stat=info) 
                                             1
Error: Using SOURCE= with a class variable at (1) not supported yet
psb_s_mat_mod.f03: In function ‘s_sizeof’:
psb_s_mat_mod.f03:152:0: error: case labels not sorted: 
case 1: is greater than case 1: but comes before it.
psb_s_mat_mod.f03:152:0: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The SOURCE= error is clear enough, but the other is interesting, because it
happens in one of the cases that gave rise to PR 41648, line 152 is the end of
this function
  function s_sizeof(a) result(res)
    implicit none 
    class(psb_s_sparse_mat), intent(in) :: a
    integer(psb_long_int_k_) :: res

    res = 0
    if (allocated(a%a)) then 
      res = a%a%sizeof()
    end if

  end function s_sizeof

Since you say you want to take them both.... 
do you need access to the full source code?

Regards
Salvatore


-- 


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


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

* [Bug fortran/41656] [OOP] Unresolved GENERIC
  2009-10-10 12:52 [Bug fortran/41656] New: [OOP] Unresolved GENERIC sfilippone at uniroma2 dot it
                   ` (2 preceding siblings ...)
  2009-10-11 18:19 ` sfilippone at uniroma2 dot it
@ 2009-10-12 13:44 ` sfilippone at uniroma2 dot it
  2009-10-13  9:07 ` sfilippone at uniroma2 dot it
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sfilippone at uniroma2 dot it @ 2009-10-12 13:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from sfilippone at uniroma2 dot it  2009-10-12 13:44 -------
(In reply to comment #3)
> (In reply to comment #2)
> 
The latest patch from Janus cures the SOURCE= problem. 
Unfortunately a simple extension of test-der5.f03 does not show the ICE; back
to the cutting board (to find a trimmed-down test case...)


-- 


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


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

* [Bug fortran/41656] [OOP] Unresolved GENERIC
  2009-10-10 12:52 [Bug fortran/41656] New: [OOP] Unresolved GENERIC sfilippone at uniroma2 dot it
                   ` (3 preceding siblings ...)
  2009-10-12 13:44 ` sfilippone at uniroma2 dot it
@ 2009-10-13  9:07 ` sfilippone at uniroma2 dot it
  2009-10-16  6:07 ` pault at gcc dot gnu dot org
  2009-10-16  6:09 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: sfilippone at uniroma2 dot it @ 2009-10-13  9:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sfilippone at uniroma2 dot it  2009-10-13 09:06 -------
(In reply to comment #4)
The recent combined patch by Paul makes my compilation progress; however a
little later I get an ICE here: 

#0  0x000000349887efa0 in strcmp () from /lib64/libc.so.6
#1  0x000000000050ffdd in gfc_find_symtree (st=0x128e7d0, name=0x0) at
../../gcc
/gcc/fortran/symbol.c:1810
#2  0x00000000004dd749 in load_derived_extensions () at
../../gcc/gcc/fortran/mo
dule.c:3604
#3  read_module () at ../../gcc/gcc/fortran/module.c:4450
#4  0x00000000004de834 in gfc_use_module () at
../../gcc/gcc/fortran/module.c:36
04
#5  0x00000000004e2ca5 in accept_statement (st=<value optimized out>) at
../../g
cc/gcc/fortran/parse.c:4047
#6  0x00007fffffffd710 in ?? ()
#7  0x00000000004e572e in parse_spec (st=<value optimized out>) at
../../gcc/gcc
/fortran/parse.c:4047
#8  0x00007fffffffd82c in ?? ()
#9  0x0000000000000000 in ?? ()


If this is related to this patch, it needs some more work. Otherwise, I'll cut
the test case and open a new PR


-- 


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


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

* [Bug fortran/41656] [OOP] Unresolved GENERIC
  2009-10-10 12:52 [Bug fortran/41656] New: [OOP] Unresolved GENERIC sfilippone at uniroma2 dot it
                   ` (4 preceding siblings ...)
  2009-10-13  9:07 ` sfilippone at uniroma2 dot it
@ 2009-10-16  6:07 ` pault at gcc dot gnu dot org
  2009-10-16  6:09 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-10-16  6:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pault at gcc dot gnu dot org  2009-10-16 06:07 -------
Subject: Bug 41656

Author: pault
Date: Fri Oct 16 06:07:09 2009
New Revision: 152890

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152890
Log:
2009-10-16  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/41648
        PR fortran/41656
        * trans-expr.c (select_class_proc): Convert the expression for the
        vindex, carried on the first member of the esym list.
        * gfortran.h : Add the vindex field to the esym_list structure.
        and eliminate the class_object field.
        * resolve.c (check_class_members): Remove the setting of the
        class_object field.
        (vindex_expr): New function.
        (get_class_from_expr): New function.
        (resolve_class_compcall): Call the above to find the ultimate
        class or derived component.  If derived, do not generate the
        esym list.  Add and expression for the vindex to the esym list
        by calling the above.
        (resolve_class_typebound_call): The same.

2009-10-16  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/41648
        * gfortran.dg/dynamic_dispatch_4.f03 : New test.

        PR fortran/41656
        * gfortran.dg/dynamic_dispatch_5.f03 : New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/dynamic_dispatch_4.f03
    trunk/gcc/testsuite/gfortran.dg/dynamic_dispatch_5.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/41656] [OOP] Unresolved GENERIC
  2009-10-10 12:52 [Bug fortran/41656] New: [OOP] Unresolved GENERIC sfilippone at uniroma2 dot it
                   ` (5 preceding siblings ...)
  2009-10-16  6:07 ` pault at gcc dot gnu dot org
@ 2009-10-16  6:09 ` pault at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-10-16  6:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2009-10-16 06:09 -------
Fixed on trunk.

Thanks for the patch.

Paul


-- 

pault at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-10-16  6:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-10 12:52 [Bug fortran/41656] New: [OOP] Unresolved GENERIC sfilippone at uniroma2 dot it
2009-10-10 12:53 ` [Bug fortran/41656] " sfilippone at uniroma2 dot it
2009-10-11 16:06 ` pault at gcc dot gnu dot org
2009-10-11 18:19 ` sfilippone at uniroma2 dot it
2009-10-12 13:44 ` sfilippone at uniroma2 dot it
2009-10-13  9:07 ` sfilippone at uniroma2 dot it
2009-10-16  6:07 ` pault at gcc dot gnu dot org
2009-10-16  6:09 ` pault 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).