This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Functions returning pointers


Paul Brook wrote:
>>Fix below, as you suggested off-list.
> 
> 
> You should know better than to believe what I tell you ;-)

OK, you're no longer my infallible Guru! :-)

> This condition should be
> if (sym->attr.pointer && !(se->want_pointer || byref))
> 
> Incomplete testcase:
> program assignment_2
>   character, target :: t
>   character, pointer :: p
> 
>   p = f()
> contains
> function f()
>   character, pointer :: f
>   f => t
> end function
> end program
> 

Unfortunately, it doesn't work this way. Nothing from the tree dumps strikes
me as an obvious mistake right now, but I'll see if I can find out what goes
wrong.

> It also makes sense to test the warning.

Agreed.

- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]