[Bug fortran/51995] Polymorphic class fails at runtime

2012-01-25 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51995

--- Comment #1 from Dominique d'Humieres dominiq at lps dot ens.fr 2012-01-25 
10:59:09 UTC ---
I confirm that on x86_64-apple-darwin10 from
gcc version 4.6.0 20100723 (experimental) [trunk revision 162456] (GCC) up to
now,
gfortran gives the following errors for the test

pr51995.f90:91.31:

CALL db_connect%description()
   1
Error: 'description' at (1) is not a member of the 'connection' structure
pr51995.f90:98.31:

CALL db_connect%description()
   1
Error: 'description' at (1) is not a member of the 'connection' structure

while up to
gcc version 4.6.0 20100413 (experimental) [trunk revision 158252] (GCC)
it gives

pr51995.f90:15.28:

 PROCEDURE(generic_desc), DEFERRED, PASS(self) :: description
1
Error: Passed-object dummy argument of 'generic_desc' at (1) must not be
POINTER
pr51995.f90:82.23:

USE factory_pattern
   1
Fatal Error: Can't open module file 'factory_pattern.mod' for reading at (1):
No such file or directory

Also gcc version 4.6.0 20100506 (experimental) [trunk revision 159106] (GCC)
gives

f951: internal compiler error: in find_typebound_proc_uop, at
fortran/symbol.c:5255
Please submit a full bug report,

So if it has worked, it looks like a transient.


[Bug fortran/51995] Polymorphic class fails at runtime

2012-01-25 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51995

--- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org 2012-01-25 
11:05:41 UTC ---
Using today's GCC 4.7 and using one one-week-old one, it compiles without any
error.

It seems as if the bug has been already fixed - or it only affects certain
architectures. Can you provide more details about the used GCC version
(gfortran -v)? You should also try a newer version and check whether the
issue still occurs.


[Bug fortran/51995] Polymorphic class fails at runtime

2012-01-25 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51995

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org 2012-01-25 
11:11:18 UTC ---
(In reply to comment #1)
 I confirm that on x86_64-apple-darwin10 from
 gcc version 4.6.0 20100723 (experimental) [trunk revision 162456] (GCC) up to
 now, gfortran gives the following errors

Hmm, it also works for me (on x86_64-unknown-linux-gnu) with
  4.6.3 20111212 [gcc-4_6-branch revision 18]
  4.6.3 20120121 [gcc-4_6-branch revision 183121]

I tried running gfortran through valgrind (4.7 and 4.6) but that only shows
memory leakage.

As it does not fail for me, I cannot debug it, sorry.


[Bug fortran/51995] Polymorphic class fails at runtime

2012-01-25 Thread jilfa12 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51995

--- Comment #4 from Prince jilfa12 at yahoo dot com 2012-01-25 11:16:29 UTC 
---
Thanks Dominiq.

I tested the program on i686 GNU/Linux running on Ubuntu-Maverick using gcc
version 4.7.0 20120118 (experimental) (GCC).

Using ifort 12, it gives the correct results.

So it is definitely a bug in gfortran. Do you have any work-around?




 From: dominiq at lps dot ens.fr gcc-bugzi...@gcc.gnu.org
To: jilf...@yahoo.com 
Sent: Wednesday, January 25, 2012 12:59 PM
Subject: [Bug fortran/51995] Polymorphic class fails at runtime

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

--- Comment #1 from Dominique d'Humieres dominiq at lps dot ens.fr 2012-01-25
10:59:09 UTC ---
I confirm that on x86_64-apple-darwin10 from
gcc version 4.6.0 20100723 (experimental) [trunk revision 162456] (GCC) up to
now,
gfortran gives the following errors for the test

pr51995.f90:91.31:

    CALL db_connect%description()
                               1
Error: 'description' at (1) is not a member of the 'connection' structure
pr51995.f90:98.31:

    CALL db_connect%description()
                               1
Error: 'description' at (1) is not a member of the 'connection' structure

while up to
gcc version 4.6.0 20100413 (experimental) [trunk revision 158252] (GCC)
it gives

pr51995.f90:15.28:

     PROCEDURE(generic_desc), DEFERRED, PASS(self) :: description
                            1
Error: Passed-object dummy argument of 'generic_desc' at (1) must not be
POINTER
pr51995.f90:82.23:

    USE factory_pattern
                       1
Fatal Error: Can't open module file 'factory_pattern.mod' for reading at (1):
No such file or directory

Also gcc version 4.6.0 20100506 (experimental) [trunk revision 159106] (GCC)
gives

f951: internal compiler error: in find_typebound_proc_uop, at
fortran/symbol.c:5255
Please submit a full bug report,

So if it has worked, it looks like a transient.