[Bug fortran/51208] [OOP] ALLOCATE with SOURCE= or MOLD=: Diagnose if variable occurs twice

sgk at troutmask dot apl.washington.edu gcc-bugzilla@gcc.gnu.org
Fri Nov 18 19:55:00 GMT 2011


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

--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2011-11-18 19:49:32 UTC ---
On Fri, Nov 18, 2011 at 07:02:25PM +0000, burnus at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51208
> 
> --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-11-18 19:02:25 UTC ---
> (In reply to comment #3)
> > Although I think this is equivalent to putting a bandaid
> > on a AK-47 bullet hole, here you go
> 
> Thanks for the patch. Only one remark: For
>   allocate (x(2)%a, source=x(1)%a)
> one gets a false positive.
> 

bandaid (adj) -- Informal. serving as a makeshift, limited,
or temporary aid or solution

:-)

The error message can be disable for derived type objects via

  if (found && p->expr->symtree->n.sym->ts.type != BT_DERIVED)

now one may get accepts-invalid over a false-positive.



More information about the Gcc-bugs mailing list