[Bug fortran/41829] [OOP] Runtime error with dynamic dispatching

sfilippone at uniroma2 dot it gcc-bugzilla@gcc.gnu.org
Mon Oct 26 12:38:00 GMT 2009



------- Comment #1 from sfilippone at uniroma2 dot it  2009-10-26 12:38 -------
(In reply to comment #0)
> Hello,
> 
Sorry, hit the keyboard too soon. 
With trunk at rev. 153550 the attached code compiles cleanly but does not work:
------------------------------------------------------------------------------
[sfilippo@donald bug10]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gnu45/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gnu45
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.5.0 20091026 (experimental) (GCC) 
[sfilippo@donald bug10]$ gfortran -o td10 test-der10.f03
[sfilippo@donald bug10]$ ./td10 
 FOO%DOIT base version
 Getit value :            1
At line 69 of file test-der10.f03
Fortran runtime error: internal error: bad vindex in dynamic dispatch
------------------------------------------------------------------------

With the NAG compiler I get the expected result:
------------------------------------------------
 FOO%DOIT base version
 Getit value :  1
 FOO2%DOIT derived version
 Getit value :  3
-----------------------------------------------


-- 


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



More information about the Gcc-bugs mailing list