This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42207] [OOP] Compile-time errors on typed allocation and pointer function result assignment
- From: "damian at rouson dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Nov 2009 01:16:28 -0000
- Subject: [Bug fortran/42207] [OOP] Compile-time errors on typed allocation and pointer function result assignment
- References: <bug-42207-15301@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from damian at rouson dot net 2009-11-30 01:16 -------
Janus,
Although the new reduced case compiles fine in 64-bit mode, I run into linking
problems as soon as I add "program main; end program" to the end of it:
Undefined symbols:
"_vtab$bar.1550", referenced from:
___m_MOD_new_bar in ccQEi2ET.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Looking back through my e-mails, I see that you told me on 11/21 that Paul's
TBP patch had not yet been applied to the branch or the trunk. From the above
results, I assume that's still the case.
Damian
(In reply to comment #4)
> (In reply to comment #2)
> > On darwin, the errors appear only in 32 bit mode.
>
> Yes, I can confirm this on x86_64-apple-darwin10.2.0. Also, I just ran the
> fortran testsuite for the fortran-dev branch on darwin, but saw no failures.
>
> Here is a reduced test case:
>
>
> module m
>
> implicit none
>
> type foo
> end type
>
> type ,extends(foo) :: bar
> end type
>
> contains
>
> function new_bar()
> class(foo) ,pointer :: new_bar
> allocate(bar :: new_bar)
> end function
>
> end module
>
>
> Important: This only happens inside a module. If I remove the "module m/end
> module" in the example, the error goes away.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42207