[Patch, Fortran] PR50923 - [4.4-4.7] Print warning function does not return a value
Tobias Burnus
burnus@net-b.de
Wed Dec 7 13:54:00 GMT 2011
** PING **
On 11/30/2011 07:19 PM, Tobias Burnus wrote:
> The bug has been introduced when changing the warning system to do
> more in the front end. The problem is that for:
> module m
> contains
> function f()
> end
> end
> the sym->attr.referenced gets set - and no warning is printed. I now
> ignore the sym->attr.referenced attribute as the RESULT == NULL_TREE
> should only be reached if the variable has not been assigned a value.
>
> Additionally, I now only set TREE_NO_WARNING() if a warning has been
> printed; that way, some other useful middle-end warnings might be
> still printed. I have to set the NO_WARNING also for sym !=
> sym->result as it otherwise prints a middle end warning into addition
> to the FE warning. But the FE warning has been printed already before
> for the result variable.
>
> Build and regtested on x86-64-linux.
> OK for the trunk? How far should this be backported - all the way down
> to 4.4?
>
> Tobias
More information about the Gcc-patches
mailing list