public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Possible Bugs in cgraphunit.c
@ 2019-12-05  8:01 Nicholas Krause
  2019-12-05 12:08 ` Martin Liška
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Krause @ 2019-12-05  8:01 UTC (permalink / raw)
  To: gcc Mailing List

Greetings,
Seems that the extend_trucks return values are not returned when called 
in both,
cnode::assemble_thunks_and_aliases and cnode::create_wrapper. I'm not sure
if this is a set of edge case bugs or there was a reason for this. Seems 
not as its
checked in the third function caller in the file, cgraph_node::analyze.

Not sure if my assumptions are correct so I'm asking if there isn't 
another reason
for this as the code seems to have at least directly no reason for it,

Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible Bugs in cgraphunit.c
  2019-12-05  8:01 Possible Bugs in cgraphunit.c Nicholas Krause
@ 2019-12-05 12:08 ` Martin Liška
  2019-12-05 16:08   ` Nicholas Krause
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2019-12-05 12:08 UTC (permalink / raw)
  To: Nicholas Krause, gcc Mailing List

On 12/5/19 9:00 AM, Nicholas Krause wrote:
> Greetings,
> Seems that the extend_trucks return values are not returned when called in both,
> cnode::assemble_thunks_and_aliases and cnode::create_wrapper. I'm not sure
> if this is a set of edge case bugs or there was a reason for this. Seems not as its
> checked in the third function caller in the file, cgraph_node::analyze.

Hello.

You are right that the return value of expand_thunk is not checked (except one place).
The code is quite old, so I guess it's not causing issues.

Martin

> 
> Not sure if my assumptions are correct so I'm asking if there isn't another reason
> for this as the code seems to have at least directly no reason for it,
> 
> Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible Bugs in cgraphunit.c
  2019-12-05 12:08 ` Martin Liška
@ 2019-12-05 16:08   ` Nicholas Krause
  2019-12-09 12:24     ` Martin Liška
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Krause @ 2019-12-05 16:08 UTC (permalink / raw)
  To: Martin Liška, gcc Mailing List



On 12/5/19 7:08 AM, Martin Liška wrote:
> On 12/5/19 9:00 AM, Nicholas Krause wrote:
>> Greetings,
>> Seems that the extend_trucks return values are not returned when 
>> called in both,
>> cnode::assemble_thunks_and_aliases and cnode::create_wrapper. I'm not 
>> sure
>> if this is a set of edge case bugs or there was a reason for this. 
>> Seems not as its
>> checked in the third function caller in the file, cgraph_node::analyze.
>
> Hello.
>
> You are right that the return value of expand_thunk is not checked 
> (except one place).
> The code is quite old, so I guess it's not causing issues.
>
> Martin
>
Indeed or the edge cases are almost never hit or not at all. So the 
question is should
we just change the function to return void as its always successful or 
fix up the callers?

Nick
>>
>> Not sure if my assumptions are correct so I'm asking if there isn't 
>> another reason
>> for this as the code seems to have at least directly no reason for it,
>>
>> Nick
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Possible Bugs in cgraphunit.c
  2019-12-05 16:08   ` Nicholas Krause
@ 2019-12-09 12:24     ` Martin Liška
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liška @ 2019-12-09 12:24 UTC (permalink / raw)
  To: Nicholas Krause, gcc Mailing List

On 12/5/19 5:08 PM, Nicholas Krause wrote:
> 
> 
> On 12/5/19 7:08 AM, Martin Liška wrote:
>> On 12/5/19 9:00 AM, Nicholas Krause wrote:
>>> Greetings,
>>> Seems that the extend_trucks return values are not returned when called in both,
>>> cnode::assemble_thunks_and_aliases and cnode::create_wrapper. I'm not sure
>>> if this is a set of edge case bugs or there was a reason for this. Seems not as its
>>> checked in the third function caller in the file, cgraph_node::analyze.
>>
>> Hello.
>>
>> You are right that the return value of expand_thunk is not checked (except one place).
>> The code is quite old, so I guess it's not causing issues.
>>
>> Martin
>>
> Indeed or the edge cases are almost never hit or not at all.

There is one usage of the return value.

> So the question is should
> we just change the function to return void as its always successful or fix up the callers?

I would leave it as is.
Martin

> 
> Nick
>>>
>>> Not sure if my assumptions are correct so I'm asking if there isn't another reason
>>> for this as the code seems to have at least directly no reason for it,
>>>
>>> Nick
>>
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-09 12:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05  8:01 Possible Bugs in cgraphunit.c Nicholas Krause
2019-12-05 12:08 ` Martin Liška
2019-12-05 16:08   ` Nicholas Krause
2019-12-09 12:24     ` Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).